Skip to content

armgit / cogit

Public Imported from GitHub
0

Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.

fix(package): publish as @cogit/cli

Eren8a2a1651e56f
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index a6afc02..b680b8d 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -5,7 +5,7 @@
"plugins": [
{
"name": "cogit",
- "source": { "source": "npm", "package": "cogit" },
+ "source": { "source": "npm", "package": "@cogit/cli" },
"description": "Records what each session decided and why, and renders it as a static map."
}
]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1ee3c57..1769f2c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
+### Changed
+- The npm package is `@cogit/cli` (npm refused the bare `cogit` name as too close to an existing package): `npm install -g @cogit/cli`. The command is still `cogit`, and the plugin is still installed as `cogit`.
## [0.17.1] - 2026-10-27
### Fixed
diff --git a/README.md b/README.md
index c4fe8d2..e1c6180 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@ reads. cogit keeps it next to the code. [More, with sources](docs/guide/why.md).
You need Node 22.13+, Claude Code 2.1.275+ and a git repository.
```bash
-npm install -g cogit
+npm install -g @cogit/cli
```
Then, in Claude Code:
diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md
index 3a066d8..1091f4c 100644
--- a/docs/guide/getting-started.md
+++ b/docs/guide/getting-started.md
@@ -10,8 +10,8 @@
## Install
```bash
-npm install -g cogit # the CLI
-npx cogit --help # or run it without installing
+npm install -g @cogit/cli # the CLI; the command is `cogit`
+npx @cogit/cli --help # or run it without installing
```
The Claude Code plugin adds the skill that keeps the record and the hooks that maintain it:
@@ -80,7 +80,7 @@ If you agreed to turn the plugin on for the repository, `init` wrote the project
message once, with the install command. Send the message again to go on without recording.
Headless runs (`claude -p`) are never stopped.
-Each teammate runs `npm install -g cogit` and `cogit init` once on their machine; `init` sees
+Each teammate runs `npm install -g @cogit/cli` and `cogit init` once on their machine; `init` sees
the project is already set up, registers it on their machine and installs the git hooks in
their clone. With the default commit policy,
everyone's records travel with the branch. See [Teams and git](teams-and-git.md).
diff --git a/package-lock.json b/package-lock.json
index 0ac65dd..ea3cde8 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -290,6 +290,10 @@
"node": ">=14.21.3"
}
},
+ "node_modules/@cogit/cli": {
+ "resolved": "packages/cli",
+ "link": true
+ },
"node_modules/@esbuild/aix-ppc64": {
"version": "0.28.2",
"resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz",
@@ -2547,10 +2551,6 @@
"node": ">= 12"
}
},
- "node_modules/cogit": {
- "resolved": "packages/cli",
- "link": true
- },
"node_modules/commander": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
@@ -4037,8 +4037,8 @@
}
},
"packages/cli": {
- "name": "cogit",
- "version": "0.10.0",
+ "name": "@cogit/cli",
+ "version": "0.17.1",
"license": "MIT",
"bin": {
"cogit": "dist/cli.js"
diff --git a/package.json b/package.json
index 5d7878b..30c7ae2 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
"node": ">=22.13.0"
},
"scripts": {
- "build": "npm run build -w template && npm run build -w cogit",
+ "build": "npm run build -w template && npm run build -w packages/cli",
"dev:template": "npm run dev -w template",
"lint": "biome check .",
"format": "biome check --write .",
diff --git a/packages/cli/package.json b/packages/cli/package.json
index bcf03f7..b1a7158 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,5 +1,5 @@
{
- "name": "cogit",
+ "name": "@cogit/cli",
"version": "0.17.1",
"description": "Git remembers what changed. cogit remembers why.",
"license": "MIT",
@@ -31,6 +31,9 @@
"skills",
"hooks"
],
+ "publishConfig": {
+ "access": "public"
+ },
"engines": {
"node": ">=22.13.0"
},
diff --git a/packages/cli/skills/record/SKILL.md b/packages/cli/skills/record/SKILL.md
index 7860ce4..c43c2d3 100644
--- a/packages/cli/skills/record/SKILL.md
+++ b/packages/cli/skills/record/SKILL.md
@@ -13,7 +13,7 @@ The current record (`cogit session show`):
## Check first
- `initialized: false`: reply exactly "cogit is not set up in this project yet; run
- `npx cogit init` here first." and stop.
+ `npx @cogit/cli init` here first." and stop.
- `sessionError`: quote it and stop; never write over the record.
- Nothing new or changed (`newMessages` empty): reply "Lineage is up to date." and stop.
diff --git a/packages/cli/test/plugin-manifest.test.ts b/packages/cli/test/plugin-manifest.test.ts
index 8022020..8c7140b 100644
--- a/packages/cli/test/plugin-manifest.test.ts
+++ b/packages/cli/test/plugin-manifest.test.ts
@@ -21,7 +21,12 @@ describe("plugin packaging", () => {
// VERSION is the source; `npm run build` copies it (scripts/sync-version.mjs).
const version = (await readFile(new URL("../../../VERSION", import.meta.url), "utf8")).trim();
expect(pkg.version, "run npm run build to sync VERSION").toBe(version);
- expect(plugin.name).toBe(pkg.name);
+ // The plugin keeps the short name; npm only had room for it under the @cogit scope.
+ expect(plugin.name).toBe("cogit");
+ expect(pkg.name).toBe("@cogit/cli");
+ expect(pkg.bin).toEqual({ cogit: "dist/cli.js" });
+ // A scoped package publishes as private unless told otherwise.
+ expect(pkg.publishConfig).toEqual({ access: "public" });
expect(pkg.files).toEqual(
expect.arrayContaining(["dist", ".claude-plugin", "skills", "hooks"]),
);
@@ -32,7 +37,7 @@ describe("plugin packaging", () => {
const pkg = await read("../package.json");
expect(marketplace.plugins).toEqual([
expect.objectContaining({
- name: pkg.name,
+ name: "cogit",
source: { source: "npm", package: pkg.name },
}),
]);