@tanagram/cli 0.1.29 → 0.1.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +27 -15
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -17,35 +17,33 @@ webui/src/Button.tsx:42 - [No hardcoded colors] Don't use hard-coded color value
17
17
 
18
18
  ## Installation
19
19
 
20
- ### Via npm (Recommended)
20
+ ### Quick Start (3 steps)
21
21
 
22
22
  ```bash
23
+ # 1. Install globally via npm
23
24
  npm install -g @tanagram/cli
24
- tanagram --help
25
+
26
+ # 2. Setup Claude Code hook (automatic)
27
+ tanagram config claude
28
+
29
+ # 3. Run tanagram (will prompt for API key on first run)
30
+ tanagram
25
31
  ```
26
32
 
27
33
  **Requirements:**
28
34
  - Node.js >= 14.0.0
29
- - **Anthropic API Key** (required for LLM-based policy extraction)
35
+ - **Anthropic API Key** (you'll be prompted to enter it on first run)
30
36
 
31
37
  The CLI is written in Go but distributed via npm for easier installation and version management. During installation, npm automatically downloads the Go compiler and builds the binary for your platform (no manual setup needed!).
32
38
 
33
39
  ### API Key Setup
34
40
 
35
- Tanagram uses Claude AI (via Anthropic API) to extract policies from your instruction files. You need to bring your own API key:
36
-
37
- ```bash
38
- # Set your Anthropic API key
39
- export ANTHROPIC_API_KEY="sk-ant-..."
40
-
41
- # Or add to your shell profile (~/.bashrc, ~/.zshrc, etc.)
42
- echo 'export ANTHROPIC_API_KEY="sk-ant-..."' >> ~/.zshrc
43
- ```
41
+ Tanagram uses Claude AI (via Anthropic API) to extract policies from your instruction files. On first run, you'll be prompted to enter your API key, which will be saved to `~/.tanagram/config.json`.
44
42
 
45
43
  **Get an API key:**
46
44
  1. Sign up at [https://console.anthropic.com](https://console.anthropic.com)
47
45
  2. Create an API key in the dashboard
48
- 3. Set the `ANTHROPIC_API_KEY` environment variable
46
+ 3. Run `tanagram` and enter your key when prompted
49
47
 
50
48
  ### Local Development
51
49
 
@@ -97,9 +95,23 @@ tanagram help
97
95
  - **`help`** - Show usage information
98
96
 
99
97
  ### Claude Code Hook
100
- You can install the CLI as a Claude Code [hook](https://code.claude.com/docs/en/hooks) to have Claude automatically iterate on Tanagram's output.
101
98
 
102
- Add this to your `~/.claude/settings.json` (user settings) or `.claude/settings.json` (project settings):
99
+ Install the CLI as a Claude Code [hook](https://code.claude.com/docs/en/hooks) to have Claude automatically iterate on Tanagram's output.
100
+
101
+ **Easy setup (recommended):**
102
+ ```bash
103
+ tanagram config claude
104
+ ```
105
+
106
+ This automatically adds the hook to your `~/.claude/settings.json`. It's safe to run multiple times and will preserve any existing settings.
107
+
108
+ **Check hook status:**
109
+ ```bash
110
+ tanagram config list
111
+ ```
112
+
113
+ **Manual setup (alternative):**
114
+ If you prefer to manually edit your settings, add this to your `~/.claude/settings.json` (user settings) or `.claude/settings.json` (project settings):
103
115
 
104
116
  ```json
105
117
  "hooks": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanagram/cli",
3
- "version": "0.1.29",
3
+ "version": "0.1.31",
4
4
  "description": "Tanagram - Catch sloppy code before it ships",
5
5
  "main": "index.js",
6
6
  "bin": {