@poridhi/pukucode 0.1.1
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.
- package/LICENSE +29 -0
- package/README.md +122 -0
- package/bin/import-specifier.mjs +7 -0
- package/bin/import-specifier.test.mjs +13 -0
- package/bin/openclaude +32 -0
- package/dist/cli.mjs +557135 -0
- package/package.json +149 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
NOTICE
|
|
2
|
+
|
|
3
|
+
This repository contains code derived from Anthropic's Claude Code CLI.
|
|
4
|
+
|
|
5
|
+
The original Claude Code source is proprietary software:
|
|
6
|
+
Copyright (c) Anthropic PBC. All rights reserved.
|
|
7
|
+
Subject to Anthropic's Commercial Terms of Service.
|
|
8
|
+
|
|
9
|
+
Modifications and additions by OpenClaude contributors are offered under
|
|
10
|
+
the MIT License where legally permissible:
|
|
11
|
+
|
|
12
|
+
MIT License
|
|
13
|
+
Copyright (c) 2026 OpenClaude contributors (modifications only)
|
|
14
|
+
|
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
16
|
+
a copy of the modifications made by OpenClaude contributors, to deal
|
|
17
|
+
in those modifications without restriction, including without limitation
|
|
18
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
19
|
+
and/or sell copies, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included
|
|
22
|
+
in all copies or substantial portions of the modifications.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
|
25
|
+
|
|
26
|
+
The underlying derived code remains subject to Anthropic's copyright.
|
|
27
|
+
This project does not have Anthropic's authorization to distribute
|
|
28
|
+
their proprietary source. Users and contributors should evaluate their
|
|
29
|
+
own legal position.
|
package/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Puku CLI
|
|
2
|
+
|
|
3
|
+
Puku CLI (`pukucode`) is an AI coding assistant powered by Poridhi Agentic Workflow. It provides a terminal-first coding agent experience backed by the Puku Worker infrastructure and MiniMax models.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Google OAuth authentication via Puku Worker
|
|
8
|
+
- MiniMax M2.5 model via Puku Worker infrastructure
|
|
9
|
+
- Terminal-first coding workflow: prompts, tools, agents, slash commands, streaming output
|
|
10
|
+
- Bash, file read/write/edit, grep, glob, agents, tasks, MCP, and web tools
|
|
11
|
+
- Session caching — login once, stay authenticated for 7 days
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
### Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @poridhi/pukucode
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Configure
|
|
24
|
+
|
|
25
|
+
Create a `.env` file or export these variables:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
export PUKU_AUTH=true
|
|
29
|
+
export PUKU_WORKER_URL=https://api.puku.sh
|
|
30
|
+
export ANTHROPIC_MODEL=MiniMax-M2.5
|
|
31
|
+
export APP_NAME=pukucode
|
|
32
|
+
export APP_CLI_NAME=Puku CLI
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Start
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pukucode
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
On first run, a browser window will open for Google login. After authenticating, the session is cached at `~/.config/pukucode/session.json` and reused on subsequent runs.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## How It Works
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
pukucode CLI
|
|
49
|
+
│ Google session token (Bearer)
|
|
50
|
+
▼
|
|
51
|
+
api.puku.sh/v1/messages → validates session → MiniMax API
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- Authentication is handled via Google OAuth through Puku Worker
|
|
55
|
+
- The MiniMax API key never leaves the server — only your Google session token is used on the client
|
|
56
|
+
- Sessions expire after 7 days, after which the browser login flow triggers again automatically
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Environment Variables
|
|
61
|
+
|
|
62
|
+
| Variable | Required | Description |
|
|
63
|
+
|----------|----------|-------------|
|
|
64
|
+
| `PUKU_AUTH` | Yes | Set to `true` to enable Google OAuth mode |
|
|
65
|
+
| `PUKU_WORKER_URL` | Yes | Puku Worker base URL (e.g. `https://api.puku.sh`) |
|
|
66
|
+
| `ANTHROPIC_MODEL` | Yes | Model to use (e.g. `MiniMax-M2.5`) |
|
|
67
|
+
| `APP_NAME` | No | App name (default: `pukucode`) |
|
|
68
|
+
| `APP_CLI_NAME` | No | CLI display name (default: `Puku CLI`) |
|
|
69
|
+
| `APP_TAGLINE` | No | Startup screen tagline |
|
|
70
|
+
| `SHOW_LOGO` | No | Set to `false` to hide ASCII logo |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Session Management
|
|
75
|
+
|
|
76
|
+
Sessions are stored locally at:
|
|
77
|
+
```
|
|
78
|
+
~/.config/pukucode/session.json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
To log out and re-authenticate:
|
|
82
|
+
```bash
|
|
83
|
+
rm ~/.config/pukucode/session.json
|
|
84
|
+
pukucode
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Source Build
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
git clone <repo>
|
|
93
|
+
cd openclaude
|
|
94
|
+
bun install
|
|
95
|
+
bun run build
|
|
96
|
+
node dist/cli.mjs
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
For development with live env:
|
|
100
|
+
```bash
|
|
101
|
+
set -a && source .env.local && set +a && bun run dev
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Security
|
|
107
|
+
|
|
108
|
+
- Google session tokens are stored locally with `0600` permissions
|
|
109
|
+
- MiniMax API keys are never exposed to the client
|
|
110
|
+
- All API calls go through Puku Worker which validates your session on every request
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Disclaimer
|
|
115
|
+
|
|
116
|
+
Puku CLI is built on top of an open-source CLI codebase and is powered by Poridhi Agentic Workflow. It is not affiliated with Anthropic.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## License
|
|
121
|
+
|
|
122
|
+
MIT
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import assert from 'node:assert/strict'
|
|
2
|
+
import test from 'node:test'
|
|
3
|
+
|
|
4
|
+
import { getDistImportSpecifier } from './import-specifier.mjs'
|
|
5
|
+
|
|
6
|
+
test('builds a file URL import specifier for dist/cli.mjs', () => {
|
|
7
|
+
const specifier = getDistImportSpecifier('C:\\repo\\bin')
|
|
8
|
+
|
|
9
|
+
assert.equal(
|
|
10
|
+
specifier,
|
|
11
|
+
'file:///C:/repo/dist/cli.mjs',
|
|
12
|
+
)
|
|
13
|
+
})
|
package/bin/openclaude
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* OpenClaude — Claude Code with any LLM
|
|
5
|
+
*
|
|
6
|
+
* If dist/cli.mjs exists (built), run that.
|
|
7
|
+
* Otherwise, tell the user to build first or use `bun run dev`.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { existsSync } from 'fs'
|
|
11
|
+
import { join, dirname } from 'path'
|
|
12
|
+
import { fileURLToPath, pathToFileURL } from 'url'
|
|
13
|
+
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
15
|
+
const distPath = join(__dirname, '..', 'dist', 'cli.mjs')
|
|
16
|
+
|
|
17
|
+
if (existsSync(distPath)) {
|
|
18
|
+
await import(pathToFileURL(distPath).href)
|
|
19
|
+
} else {
|
|
20
|
+
console.error(`
|
|
21
|
+
openclaude: dist/cli.mjs not found.
|
|
22
|
+
|
|
23
|
+
Build first:
|
|
24
|
+
bun run build
|
|
25
|
+
|
|
26
|
+
Or run directly with Bun:
|
|
27
|
+
bun run dev
|
|
28
|
+
|
|
29
|
+
See README.md for setup instructions.
|
|
30
|
+
`)
|
|
31
|
+
process.exit(1)
|
|
32
|
+
}
|