ReferenceCLI Commands

Plugin

How to use each cdg plugin subcommand, and the three installation scopes of the CodeDAG Guide plugin.

The private beta opens soon, and CodeDAG isn't available to install yet. Join the waitlist to get in line for an invite.
Edit on GitHub

cdg plugin has four subcommands, install, status, update, and uninstall, for installing, checking, updating, and uninstalling the CodeDAG Guide plugin. The plugin is published in the GitHub repository CodedagAI/codedag-plugin-marketplace. Both Claude Code and Codex add this repository as a marketplace named codedag, and in both agents the plugin's identifier is codedag@codedag. None of these commands require you to be signed in, and the current directory doesn't have to be a project initialized with cdg init. For what the plugin does and how to manage it day to day, see Manage the CodeDAG Guide Plugin.

An installation or update takes effect only in agent sessions opened afterward. To use the new plugin in a session that's already open, exit it and resume it with claude --resume or codex resume.

Choose the target agents

All four subcommands take the following options to select which agent's plugin to act on:

OptionWhose plugin it acts on
--claudeClaude Code
--codexCodex
-a, --allClaude Code and Codex
OmittedSame as --all

When the option is omitted or is --all, install and update act only on the agents installed on this machine.

cdg plugin install

Terminal
cdg plugin install [--claude | --codex | --all] [-s <scope>]

cdg plugin install installs the plugin for the target agents, first adding the codedag marketplace to any agent that doesn't have it yet. -s or --scope sets the installation scope to user, project, or local, and the default is user. For how the scopes differ, see Installation scopes. You can install at the user scope from any directory. project and local, on the other hand, are installed into the checkout where you run the command, so you have to run it inside a Git repository.

Terminal
# Install for every agent installed on this machine, at the user scope
cdg plugin install
# Install for Claude Code only, at the local scope
cdg plugin install --claude -s local

When the plugin is already installed, install doesn't reinstall it or change its scope. As long as this agent's plugin is visible from the current location, at whatever scope, the command skips it. For example, once you've installed at the user scope, running cdg plugin install --scope project in any repository has no effect. To change the scope, see Change the installation scope.

Installation scopes

When you install the plugin through CodeDAG, you can choose from three scopes for both Claude Code and Codex: user, project, and local. The default is user. The scopes differ in where the configuration that enables the plugin is written, which in turn determines where the plugin takes effect and whether it's shared along with the repository:

ScopeWhere it takes effectWhere the configuration is writtenBest for
user (default)Every repository and replica on this computerClaude Code's or Codex's configuration in your home directory. Nothing is written to any repositoryWorking on your own, or using CodeDAG in several repositories
projectThis repository. Once the configuration is committed, it's shared with your team along with the repository.claude/settings.json or .codex/config.toml in the current checkout, which is under version control. Claude Code's file also records which repository the codedag marketplace comes fromMaking the plugin available to every team member who opens this repository
localThe current checkout, plus the repository's other worktrees for Claude Code. It isn't shared along with the repository.claude/settings.local.json or .codex/config.toml, ignored by GitTrying the plugin out in one repository without affecting other repositories or team members. For Codex, the repository must not have .codex/config.toml committed

Codex's project and local scopes write the same file, .codex/config.toml. The difference is whether the file is committed to the repository or ignored by Git. CodeDAG only adds or removes the plugin's entry in this file, so any other Codex settings you've put in it stay as they are.

Project scope

The project scope's configuration is shared along with the project repository. Once other members pull it and run cdg init, CodeDAG installs the plugin according to that configuration without asking for a scope. See Onboard new members.

Members who have run cdg init usually don't need to do anything more, but two cases call for a little extra handling:

  • The plugin installation was skipped during initialization.
  • You use Claude Code and made another clone of the repository on the same computer: Claude Code registers project-scope installations separately for each checkout, so the installation in the original checkout doesn't count for the new clone. Codex, by contrast, shares its plugin installation across every project on this computer, so there's no need to install it again for Codex in the new clone.

In both cases, cdg plugin status shows Sync: broken, and running cdg plugin update installs the plugin.

Local scope

The local scope's configuration is written to a file that Git ignores, so it takes effect only on this machine. CodeDAG writes the ignore rule to the repository's info/exclude (.git/info/exclude in an ordinary repository) when it installs. Git applies that file only on this machine, so installing at the local scope doesn't require any change to the .gitignore your team shares. The two agents write different files:

  • Claude Code: Uses Claude Code's native local scope, which writes the enablement entry to .claude/settings.local.json.
  • Codex: Codex doesn't natively support a local scope, so CodeDAG writes the enablement entry to the project's .codex/config.toml and has Git ignore the whole file. As a result, any other Codex settings you put in that file also take effect only on this machine.

Codex's local scope suits two kinds of repositories: personal projects, and repositories where the team has agreed not to commit .codex/config.toml and has added it to .gitignore. Because Codex's local scope has Git ignore the whole file, it can be installed only in a repository where Git doesn't track that file. Repositories that already use Codex project configuration usually have this file committed, and in that case Codex can use only the user or project scope.

Installing Codex's local scope isn't recommended in a team repository that doesn't have this file yet and where the team hasn't agreed not to commit it. The installation works there, but the team may commit the file later. When you then pull or check out that commit, Git overwrites your local copy with the repository's version, without an error or a warning, and the other settings you put in it are lost. If you've already installed it in such a repository, you can handle it in one of these ways:

  • Switch to the user scope: The user scope doesn't write any file in the repository, so there's nothing to be overwritten. For how, see Change the installation scope.
  • Agree with your team not to commit the file: Add .codex/config.toml to .gitignore, and the repository becomes the recommended kind described above.
  • Keep using the local scope: Back up the other settings you've put in this file somewhere else, and merge them back in after the file is overwritten.

The two agents also differ when you open sessions in other worktrees of the same repository. With Claude Code, all the worktrees share the .claude/settings.local.json in the main worktree, so a single installation enables the plugin in every worktree. Codex's local scope takes effect only in the checkout where you installed it, so install it separately in each worktree.

cdg plugin status

Terminal
cdg plugin status [--claude | --codex | --all]

cdg plugin status prints a set of fields for each agent. The last line, Action, says what to do next, and you can simply follow it. Two parts of the output are easy to misread:

  • Sync: up to date doesn't mean you have the latest version on GitHub: The command doesn't go online. Available version is the version the agent got the last time it refreshed the codedag marketplace, so up to date only means the installed version matches that one. Claude Code doesn't refresh marketplaces automatically by default, so this happens more often with Claude Code. To make sure you're on the latest version, just run cdg plugin update.
  • Sync: update available, local changes doesn't necessarily mean you've edited the plugin: When the command can't tell whether the plugin's files have been edited, it treats them as edited. For when this happens and what to do about it, see The plugin shows local changes you didn't make.

When more than one scope is present

When one agent's plugin is present at several scopes, for example because you installed it at the user scope and the repository also has a project scope your team committed, Scope lists all of them. Enabled is the value that actually applies in the current directory: local takes precedence over project, and project over user.

One Codex behavior can be surprising. Disabling the plugin in /plugins changes the user-level configuration, but Codex's project configuration takes precedence over the user-level configuration, so disabling it this way has no effect in projects with the project or local scope installed. If you just want to stop using the plugin yourself in such a project, see After uninstalling, by scope.

Version compatibility

The plugin and the CLI are released separately, and their version numbers don't have to match. The plugin declares the minimum CLI version it supports and the CLI version it has been verified against, and CLI compatibility uses them to show where the CLI on this machine falls. When it shows compatible, there's nothing to do. The other two values are:

  • CLI too old (requires <minimum-version> or later): The CLI on this machine is older than the minimum version the plugin supports. Upgrade the CLI. Otherwise, the agent may use commands or arguments that the CLI on this machine doesn't support yet.
  • newer than verified (verified with <verified-version>): The CLI on this machine is newer than the version the plugin has been verified against. There's nothing to do in this case, because a new CLI version keeps the commands, arguments, and meanings that released plugins rely on. If you want the agent to know about what the newer CLI adds, just update the plugin.

cdg plugin update

Terminal
cdg plugin update [--claude | --codex | --all] [--reset-local-changes]

cdg plugin update first has the agent refresh the codedag marketplace from GitHub, then updates the installed plugin to the latest version. When the plugin is installed at the user scope, running the command once from any directory is enough.

If the installation is broken, the command only repairs the plugin. It doesn't refresh the marketplace or update to the latest version. The repair installs the version in the local copy of the marketplace on this machine, which may already be out of date, and after the repair, cdg plugin status may also show up to date. So run the command once more after a repair to get the latest version.

For Claude Code, when the plugin is installed at the project or local scope of another repository, the installation there is updated only when you run the command once in that repository, because the command updates only the scopes visible from the current location. Codex is different: its plugin files are shared by every project on this computer, so updating once from any location where the plugin is installed updates the installations in every project.

--reset-local-changes

When the plugin's files have been edited, update keeps the edits by default and doesn't update that plugin this time. When you run it in a terminal, the command first asks whether to switch back to the released contents, and the default is not to. With --reset-local-changes, the command stops asking: it backs up the edited plugin and then replaces it with the latest release from the plugin repository. Even when there's no new version, the edited files go back to their released state.

Terminal
cdg plugin update --reset-local-changes

Backups go in plugin-backups/claude-code/ or plugin-backups/codex/ under CodeDAG's global directory (~/.codedag by default). Each agent keeps only the most recent backup, which is overwritten the next time a backup is made, so move out any edits you still want before then. Orchestration requirements that you want to keep long term belong in CLAUDE.md or AGENTS.md. For the reason, see Customize orchestration to the way you work.

cdg plugin uninstall

Terminal
cdg plugin uninstall [--claude | --codex | --all]

cdg plugin uninstall removes every installation visible from the current location, which is why it has no --scope option.

Which installations are removed

In a Git repository, the visible installations are the project and local scopes of this checkout plus the user scope. Outside a repository, only the user scope is visible. So which installations are removed comes down to two cases:

  • Only the user scope is installed: Wherever you run the command, it removes only the user scope, and the result is the same.
  • This checkout also has the project or local scope installed, including a project scope your team committed: Running the command in the repository removes them together with the user scope, so sessions in the other repositories on this computer can no longer use the plugin either. To uninstall only the user scope, run the command from a directory outside any Git repository.

After uninstalling, by scope

Uninstalling each scope also has the following consequences:

  • User scope:
    • Codex: The plugin is only disabled, and its files stay on this computer, because the project or local scopes of other projects may still be using them. To delete the files as well, run the command given in the uninstall output.
  • Project scope: Uninstalling changes the configuration your team shares, and once that change is committed, nobody on the team loads the plugin anymore. So if you only want to stop using it yourself, don't uninstall in the repository. Instead, depending on the agent:
    • Claude Code: Use Claude Code's own claude plugin disable codedag@codedag --scope local to disable the plugin on this machine only.
    • Codex: Codex's project configuration takes precedence over the user-level configuration, so you can't disable the plugin just for yourself. If you really don't want to use it, state in your own ~/.codex/AGENTS.md that the CodeDAG plugin isn't to be used in this repository.
  • Local scope:
    • Codex: .codex/config.toml is Codex's own configuration file. Uninstalling usually removes only the plugin's entry and leaves the file and your other settings in place. If nothing is left in the file once the plugin's entry is removed, though, the command deletes the file too. Uninstalling also removes the ignore rule that CodeDAG added, so what to do with the remaining file depends on what kind of repository it's in:
      • A repository where the team has agreed not to commit the file: .gitignore still ignores it, so there's nothing to do.
      • A personal project: The file shows up in git status as an untracked file. It's simply this project's Codex configuration, so go ahead and commit it. If you'd rather not, add an ignore rule for it yourself.
      • A team repository with no such agreement yet (the setup not recommended above): The file shows up in git status too. At this point it's just an ordinary Codex configuration file, so talk it over with your team and agree on how to handle it.
    • Claude Code, when the repository has several worktrees: All the worktrees share the .claude/settings.local.json in the main worktree, so uninstalling in one worktree also disables the plugin in the others. To keep using it in one of them, run claude plugin enable codedag@codedag --scope local in that worktree. You can't leave out --scope local.

Change the installation scope

You can't change the scope of an installed plugin directly. Uninstall it first, install it again with the new --scope, and then open a new agent session.

Both commands have to run in the right place. Uninstall from somewhere the old installation is visible. When the old scope is project or local, that's the checkout where the plugin is installed. When the new scope is project or local, the install command has to run in the target checkout too. To change the scope for only one agent, add --claude or --codex to both commands so that the other agent's plugin stays as it is.

The following commands move the plugin for both agents from the user scope to the project scope of the repository ~/code/my-app:

Terminal
cd ~/code/my-app
cdg plugin uninstall
cdg plugin install --scope project

Because the uninstall ran inside a repository, the original user-scope installation was uninstalled as well. The other repositories on this computer therefore no longer load the plugin, so install it there separately if you need it. The newly written .claude/settings.json and .codex/config.toml have to be committed to the project repository before your team members can share them.

To go the other way, from the project scope back to the user scope, likewise uninstall in this repository first and then install with --scope user. That uninstall changes the project configuration in the repository, so this change has to be committed to the project repository as well.

  • Manage the CodeDAG Guide Plugin: What the plugin does, how to confirm that it has taken effect, and how to customize the way the agent orchestrates without changing the plugin's skill files.
  • Let Your Agent Orchestrate: With the plugin installed, hand your goal to the agent and have it write the workflow and submit it.

Last updated on