Type to search the docs and updates.

Browse documentation

Project CLI and readiness

project

Run the project's installed agnostic-ai binary after checking its version against the project's requires and any exact stable version in package.json. It prefers node_modules/.bin/agnostic-ai over PATH; when the project declares an agnostic-ai dependency, it requires the local binary. On Windows it runs the package's Node launcher directly.

agnostic-ai project                     # sync --keep-edits --quiet
agnostic-ai project -v                  # the same sync, showing what it wrote
agnostic-ai project --check             # sync --check, no install or writes
agnostic-ai project --check --against index
agnostic-ai project --bootstrap         # repair dependencies once, then sync
agnostic-ai project -- hook memory --target codex

Put a command for the project binary after --. The binary's exit code is passed through, and its own report is the last thing printed. -v reaches the binary too, and so does -q for a command you give. --check -q still lists the files that drifted.

Version checks, mismatches, and limits
  • It finds the nearest project config at or above the working directory; a built-in hook can use the host's project-directory variable instead.
  • A mismatch names the installed and required versions and the agnostic-ai project --bootstrap recovery. Conflicting exact declarations stop before any install. npm ranges, tags, aliases, prereleases, and file dependencies are not read as requirements; state those in requires.
  • With --against index or HEAD, version requirements come from the staged files or commit. The binary comes from the working checkout. A config that is not staged or committed fails with the Git root's path.
  • Version and command checks share ten seconds. A failed check shows up to 64 KiB of the command's error output, marking cut-off text, timeouts, and cancellation. Warnings from a successful command do not fail it.
  • A binary without project gets an instruction to upgrade the owning package through its package manager.
FlagDescription
--checkCheck the version and generated output without installing or writing.
--against index|HEADWith --check, check the staged files (index) or the last commit (HEAD).
--bootstrapIf the binary is missing or mismatched, install once from the npm, pnpm, or bun lockfile, then sync preserving manual edits.
How bootstrap works

Bootstrap picks the package manager from packageManager or devEngines.packageManager in package.json, or an unambiguous root lockfile, and runs npm ci, pnpm install --frozen-lockfile, or bun install --frozen-lockfile. It needs a declared agnostic-ai dependency and a committed lockfile (bun.lock or bun.lockb for bun) that installs an allowed version. It leaves requires and the manifest unchanged. An error names the install command for any other package manager.

With the right binary already installed, bootstrap skips installation. If it installs a binary, package scripts run as usual. AGNOSTIC_AI_PROJECT_BOOTSTRAP=1 stops a nested helper call from installing again, while postinstall can still regenerate output.

Install a CLI that supports project globally or locally before using bootstrap. Hook managers can then call it with their existing configuration.

Project readiness

Before starting a cached environment, check the installed project binary and generated files from the project root, in a shell that stops on failure:

set -e
agnostic-ai project --check
agnostic-ai project -- doctor --checks project --check-references

Start your environment after these lines, so a failed check stops it. The second command checks every configured target, including local Markdown links in generated skills, without approving hooks on this machine. The project binary must support doctor --checks project. Keep the package pin, lockfile, and requires aligned.

  • Missing or mismatched project binary: run agnostic-ai project --bootstrap, then repeat the checks.
  • Only ignored generated files missing: run agnostic-ai project.
  • Drift: move manual edits into the source first.

A checkout hook that warns and lets Git continue does not prove startup is ready. These checks cover project configuration, not running services.