@doguyilmaz/aims 0.1.0
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 +21 -0
- package/README.md +83 -0
- package/bin/aims.js +47 -0
- package/bin/darwin-arm64/aims +0 -0
- package/bin/darwin-x64/aims +0 -0
- package/bin/linux-arm64/aims +0 -0
- package/bin/linux-x64/aims +0 -0
- package/bin/win32-x64/aims.exe +0 -0
- package/package.json +37 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dogu Yilmaz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/doguyilmaz/aims/v0.1.0/assets/logo.svg" width="96" height="96" alt="aims logo: two linked rings">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">aims</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
Several Claude Code and Codex accounts on one machine.<br>
|
|
9
|
+
Switch instantly, share history, fail over when one hits its limit.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://doguyilmaz.github.io/aims/">Documentation</a> ·
|
|
14
|
+
<a href="https://doguyilmaz.github.io/aims/docs/installation/">Install</a> ·
|
|
15
|
+
<a href="https://doguyilmaz.github.io/aims/docs/quick-start/">Quick start</a>
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
**aims** stands for **AI multi-session**. It lets you use a personal and a work account (or more) for Claude Code and Codex on one computer, without logging out and in to switch.
|
|
21
|
+
|
|
22
|
+
- **Log in once per account.** Each account keeps its own login in its own folder. Nothing is copied.
|
|
23
|
+
- **Switch instantly.** `aims use work` changes the account for new sessions; `aims claude@work` starts one right away.
|
|
24
|
+
- **One history.** Conversations, settings, skills and MCP servers are shared, so `aims claude --continue` picks up a conversation the other account started. Or keep an account's history separate.
|
|
25
|
+
- **Failover.** When an account is out of quota or its login died, the next session goes to the next account. Headless runs retry on their own when the failed attempt changed nothing.
|
|
26
|
+
- **Your AI can use it.** An MCP server and a skill let Claude Code and Codex check accounts, fail over, and hand a task to another account.
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
$ aims status
|
|
30
|
+
Claude Code ~/.claude
|
|
31
|
+
● personal me@gmail.com · pro ready 5h [###.....] 38%
|
|
32
|
+
work me@company.com · max limited 2h10m 5h [########] 100%
|
|
33
|
+
|
|
34
|
+
Codex ~/.codex
|
|
35
|
+
● personal me@gmail.com · plus ready 5h [#.......] 9%
|
|
36
|
+
work me@company.com · team ready
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Install
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
brew install --cask doguyilmaz/tap/aims # macOS, Linux
|
|
43
|
+
curl -fsSL https://raw.githubusercontent.com/doguyilmaz/aims/main/scripts/install.sh | sh
|
|
44
|
+
npm install -g @doguyilmaz/aims
|
|
45
|
+
go install github.com/doguyilmaz/aims/cmd/aims@latest
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
On Windows: `irm https://raw.githubusercontent.com/doguyilmaz/aims/main/scripts/install.ps1 | iex`, or Scoop. See [Installation](https://doguyilmaz.github.io/aims/docs/installation/).
|
|
49
|
+
|
|
50
|
+
## Start
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
aims init
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The setup finds Claude Code and Codex, turns the login you already have into your first account, creates the second, and connects the tools to aims. Then:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
aims # dashboard
|
|
60
|
+
aims claude # Claude Code as the active account
|
|
61
|
+
aims claude@work # as work, for this session
|
|
62
|
+
aims use work # new sessions use work
|
|
63
|
+
aims failover claude --resume # this account is out: switch and continue the conversation
|
|
64
|
+
aims doctor # check everything
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## How it works
|
|
68
|
+
|
|
69
|
+
Claude Code and Codex read their state from one folder (`CLAUDE_CONFIG_DIR`, `CODEX_HOME`). aims gives each account its own folder holding only its login, and links everything else to your normal `~/.claude` and `~/.codex`. `aims claude` sets the variable and starts the real `claude`; aims is not a proxy and never sees your prompts. Details in [How it works](https://doguyilmaz.github.io/aims/docs/how-it-works/).
|
|
70
|
+
|
|
71
|
+
## Development
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
go test ./... # unit and end-to-end tests (stand-ins for claude and codex)
|
|
75
|
+
go run ./cmd/aims status
|
|
76
|
+
hugo server --source docs # the documentation site
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Each supported CLI is an adapter in `internal/tool/<name>`; adding one is described in [Adding a tool](https://doguyilmaz.github.io/aims/docs/how-it-works/#adding-a-tool).
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
[MIT](LICENSE)
|
package/bin/aims.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Runs the aims binary for this platform, shipped next to this file.
|
|
3
|
+
'use strict';
|
|
4
|
+
const { spawn } = require('node:child_process');
|
|
5
|
+
const fs = require('node:fs');
|
|
6
|
+
const path = require('node:path');
|
|
7
|
+
|
|
8
|
+
const key = `${process.platform}-${process.arch}`;
|
|
9
|
+
const bin = path.join(__dirname, key, process.platform === 'win32' ? 'aims.exe' : 'aims');
|
|
10
|
+
if (!fs.existsSync(bin)) {
|
|
11
|
+
console.error(
|
|
12
|
+
`aims: there is no build for ${key} in this package.\n` +
|
|
13
|
+
'See https://doguyilmaz.github.io/aims/docs/installation/ for other ways to install.',
|
|
14
|
+
);
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
if (process.platform !== 'win32') {
|
|
18
|
+
// Some installers drop the executable bit of files outside "bin" entries.
|
|
19
|
+
try {
|
|
20
|
+
fs.accessSync(bin, fs.constants.X_OK);
|
|
21
|
+
} catch {
|
|
22
|
+
try {
|
|
23
|
+
fs.chmodSync(bin, 0o755);
|
|
24
|
+
} catch {}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const child = spawn(bin, process.argv.slice(2), { stdio: 'inherit' });
|
|
29
|
+
// Ctrl+C reaches aims directly (same process group); this process only waits.
|
|
30
|
+
// Signals sent to it alone are passed on.
|
|
31
|
+
for (const sig of ['SIGINT', 'SIGQUIT', 'SIGTERM', 'SIGHUP']) {
|
|
32
|
+
process.on(sig, () => {
|
|
33
|
+
if (sig === 'SIGTERM' || sig === 'SIGHUP') child.kill(sig);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
child.on('error', (err) => {
|
|
37
|
+
console.error(`aims: ${err.message}`);
|
|
38
|
+
process.exit(1);
|
|
39
|
+
});
|
|
40
|
+
child.on('exit', (code, signal) => {
|
|
41
|
+
if (signal) {
|
|
42
|
+
process.removeAllListeners(signal);
|
|
43
|
+
process.kill(process.pid, signal);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
process.exit(code ?? 1);
|
|
47
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@doguyilmaz/aims",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Several Claude Code and Codex accounts on one machine: instant switching, shared history, failover.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://doguyilmaz.github.io/aims/",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/doguyilmaz/aims.git"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"claude",
|
|
13
|
+
"claude-code",
|
|
14
|
+
"codex",
|
|
15
|
+
"accounts",
|
|
16
|
+
"profiles",
|
|
17
|
+
"cli"
|
|
18
|
+
],
|
|
19
|
+
"bin": {
|
|
20
|
+
"aims": "bin/aims.js"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"bin"
|
|
24
|
+
],
|
|
25
|
+
"os": [
|
|
26
|
+
"linux",
|
|
27
|
+
"win32",
|
|
28
|
+
"darwin"
|
|
29
|
+
],
|
|
30
|
+
"cpu": [
|
|
31
|
+
"arm64",
|
|
32
|
+
"x64"
|
|
33
|
+
],
|
|
34
|
+
"engines": {
|
|
35
|
+
"node": ">=18"
|
|
36
|
+
}
|
|
37
|
+
}
|