pushai 0.1.3 → 0.1.6

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/README.md CHANGED
@@ -1,38 +1,35 @@
1
1
  <p align="center">
2
- <img src="../../apps/web/public/favicon.png" alt="PushAI favicon" width="64" height="64" />
2
+ <img src="https://pushai.vercel.app/logo.svg" alt="PushAI logo" width="64" height="64" />
3
3
  </p>
4
4
 
5
5
  <h1 align="center">PushAI</h1>
6
6
 
7
7
  <p align="center">
8
- Stop writing commit messages.
8
+ <strong>Stop writing manual commit messages.</strong><br />
9
+ Let AI analyze your diffs, generate conventional commits, and push to remote – in one keystroke.
9
10
  </p>
10
11
 
11
12
  <p align="center">
12
- <a href="https://github.com/thelastofinusa/pushai">Repository</a>
13
- ·
14
- <a href="./docs/technical-decisions.md">Technical decisions</a>
15
- ·
16
- <a href="./docs/publishing.md">Publishing</a>
13
+ <a href="https://www.npmjs.com/package/pushai"><img src="https://img.shields.io/npm/v/pushai.svg" alt="npm version" /></a>
14
+ <a href="https://github.com/thelastofinusa/pushai/blob/main/LICENSE"><img src="https://img.shields.io/github/license/thelastofinusa/pushai" alt="GitHub license" /></a>
15
+ <a href="https://www.npmjs.com/package/pushai"><img src="https://img.shields.io/npm/dt/pushai.svg" alt="npm downloads" /></a>
17
16
  </p>
18
17
 
19
- ## pushai (pai)
20
-
21
- The only Git CLI you'll ever need. Stop wasting time thinking of commit messages. Let AI do it, then push in one click.
22
-
23
- [![npm version](https://img.shields.io/npm/v/pushai.svg)](https://www.npmjs.com/package/pushai)
24
-
25
18
  ### Features
26
19
 
27
- - **Multi-Provider:** Google Gemini, OpenAI, and HuggingFace support.
28
- - **Privacy First:** Support for Local LLMs (Ollama/LM Studio) via custom base URLs.
29
- - **Conventional Commits:** Automatically generates standard, readable messages.
30
- - **Auto-Push:** Stages, commits, and pushes to remote in one flow.
31
- - **Smart Init:** Automatically detects and offers to initialize git in new folders.
20
+ - **MultiProvider** Google Gemini, OpenAI, HuggingFace, and any OpenAI‑compatible local endpoint (Ollama, LM Studio).
21
+ - **Privacy First** Run completely locally by connecting to your own LLM instance.
22
+ - **Conventional Commits** Generates standardised, readable messages (`feat:`, `fix:`, `docs:`, etc.).
23
+ - **AutoPush** Stages all changes, commits with the generated message, and pushes to remote in one seamless flow.
24
+ - **Smart Init** Automatically detects missing Git repositories and offers to initialise them.
25
+ - **Interactive Approval** – Review, edit, or regenerate the commit message before anything is pushed.
26
+ - **Dry‑Run Mode** – Preview the generated message without committing or pushing.
27
+
28
+ ---
32
29
 
33
30
  ### Installation
34
31
 
35
- **Run instantly**
32
+ **Run instantly (no global install)**
36
33
 
37
34
  ```bash
38
35
  npx pushai
@@ -53,45 +50,89 @@ pnpm add -g pushai
53
50
  # or
54
51
  yarn global add pushai
55
52
  # or
56
- bunx --bun pushai
53
+ bun install -g pushai
57
54
  ```
58
55
 
59
- ### Usage
56
+ After global installation, you can use the shorthand `pai` (recommended).
60
57
 
61
- You can use the full command `pushai` or the shorthand `pai`.
58
+ ---
62
59
 
63
- **1. Initial Setup**
60
+ ### Quick Start
64
61
 
65
- The first time you run `pai`, it will guide you through configuring your AI provider and API key.
62
+ 1. **Configure your AI provider**
66
63
 
67
- ```bash
68
- pai config
69
- ```
64
+ ```bash
65
+ pai config
66
+ ```
70
67
 
71
- **2. The Main Workflow**
68
+ Follow the interactive wizard to select a provider (e.g., OpenAI, Gemini), enter your API key, and choose a model.
72
69
 
73
- Simply run `pai` when you have unstaged or modified changes.
70
+ 2. **Stage your changes and let AI do the rest**
74
71
 
75
- ```bash
76
- pai
77
- # or
78
- pai commit
79
- ```
72
+ ```bash
73
+ pai
74
+ ```
75
+
76
+ PushAI will:
77
+ - Stage all modified/untracked files.
78
+ - Generate a conventional commit message based on your diff.
79
+ - Show you the message and ask for confirmation.
80
+ - Commit and push (if you approve).
81
+
82
+ ---
80
83
 
81
84
  ### Commands
82
85
 
83
- | Command | Description |
84
- | --------------- | -------------------------------------------------------------- |
85
- | `pai` | Default action: stages changes, generates message, and pushes. |
86
- | `pai commit` | Explicitly triggers the commit/push workflow. |
87
- | `pai config` | Update your API key, provider, or model choice. |
88
- | `pai reset` | Deletes the entire `pushai` config directory. |
89
- | `pai --version` | Display current version. |
90
- | `pai --help` | Display help message. |
91
-
92
- ### Supported Providers
93
-
94
- - **Google Gemini:** `gemini-1.5-flash` (Fast & Free tier available).
95
- - **OpenAI:** `gpt-4o`, `gpt-4o-mini`.
96
- - **HuggingFace:** `Llama 3`, `Mistral`, etc.
97
- - **Local/Custom:** Anything OpenAI-compatible (Ollama, Groq).
86
+ | Command | Description |
87
+ | ---------------------- | ---------------------------------------------------------------------- |
88
+ | `pai commit` | Stage, generate, approve, commit, and push. |
89
+ | `pai commit --dry-run` | Generate a commit message and show it, but do not commit or push. |
90
+ | `pai config` | Interactive setup: choose provider, model, and set API key / base URL. |
91
+ | `pai reset` | Deletes all local configuration and API keys from your system. |
92
+ | `pai --version` / `-v` | Display the installed version. |
93
+ | `pai --help` / `-h` | Show help for all commands. |
94
+
95
+ ---
96
+
97
+ ### Configuration
98
+
99
+ PushAI stores your non‑secret settings in `~/.config/pushai/config.json` and your API key in the system keychain (macOS/Windows/Linux).
100
+
101
+ You can manually edit the config file, but using `pai config` is recommended.
102
+
103
+ Example `config.json`:
104
+
105
+ ```json
106
+ {
107
+ "provider": "openai",
108
+ "model": "gpt-4o",
109
+ "baseUrl": "http://localhost:11434/v1" // optional, for local Ollama
110
+ }
111
+ ```
112
+
113
+ > **Note:** The API key is stored securely via `keytar` and never appears in the config file.
114
+
115
+ ---
116
+
117
+ ### How It Works
118
+
119
+ 1. **`pai` / `pai commit`**
120
+ - Checks if you are inside a Git repository.
121
+ - Stages all changes (`git add .`).
122
+ - Sends the diff to your chosen AI provider with a specialised prompt.
123
+ - Returns a conventional commit message (`feat(scope): description`).
124
+
125
+ 2. **Interactive approval**
126
+ - You see the generated message inside a box.
127
+ - Options: accept, edit, regenerate, or cancel.
128
+ - If you accept, the tool commits and pushes to the current remote branch.
129
+
130
+ 3. **Security**
131
+ - API keys are stored in the system keychain, not in plain text.
132
+ - Local endpoints (`baseUrl`) keep all data on your machine.
133
+
134
+ ---
135
+
136
+ ### License
137
+
138
+ [MIT](./LICENSE) © Holiday
package/dist/index.mjs CHANGED
@@ -47,4 +47,4 @@ ${a}
47
47
  Git reported an error: ${c.message}
48
48
  `)),process.exit(1)}}}catch(o){o.name==="ExitPromptError"&&(console.log(t.dim(`
49
49
  Exited by user request.
50
- `)),process.exit(0)),M(o),process.exit(1)}}var O="pushai",z="0.1.2",N="AI-powered CLI for effortless git commits and pushes";var p=new se;p.name(O).description(N).option("--dry-run","Generate commit message but do not commit or push").action(e=>I(e.dryRun));p.name(O).description(N).version(z,"-v, --version","output the version number");p.action(()=>I(!1));p.command("commit").description("Stage changes, generate a message, and push").option("--dry-run","Generate commit message but do not commit or push").action(e=>I(e.dryRun));p.command("config").description("Configure AI providers and API keys").action(C);p.command("reset").description("Delete the local config.json file").action(L);p.parse();
50
+ `)),process.exit(0)),M(o),process.exit(1)}}var O="pushai",z="0.1.3",N="AI-powered CLI for effortless git commits and pushes";var p=new se;p.name(O).description(N).option("--dry-run","Generate commit message but do not commit or push").action(e=>I(e.dryRun));p.name(O).description(N).version(z,"-v, --version","output the version number");p.action(()=>I(!1));p.command("commit").description("Stage changes, generate a message, and push").option("--dry-run","Generate commit message but do not commit or push").action(e=>I(e.dryRun));p.command("config").description("Configure AI providers and API keys").action(C);p.command("reset").description("Delete the local config.json file").action(L);p.parse();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pushai",
3
- "version": "0.1.3",
4
- "description": "AI-powered CLI for effortless git commits and pushes",
3
+ "version": "0.1.6",
4
+ "description": "Stop writing manual commit messages.",
5
5
  "bin": {
6
6
  "pai": "./dist/index.mjs"
7
7
  },
@@ -12,6 +12,7 @@
12
12
  "pushout": "npm publish",
13
13
  "pushout-inc": "npm version patch --no-git-tag-version && pnpm pushout"
14
14
  },
15
+ "homepage": "https://pushai.vercel.app",
15
16
  "keywords": [
16
17
  "cli",
17
18
  "git",
@@ -1,17 +0,0 @@
1
-
2
- 
3
- > pushai@0.1.2 build /Users/holiday/Desktop/pushai/apps/cli
4
- > tsup src/index.ts --format esm --clean --minify
5
-
6
- CLI Building entry: src/index.ts
7
- CLI Using tsconfig: tsconfig.json
8
- CLI tsup v8.5.1
9
- CLI Using tsup config: /Users/holiday/Desktop/pushai/apps/cli/tsup.config.ts
10
- CLI Target: esnext
11
- CLI Cleaning output folder
12
- ESM Build start
13
- ESM dist/index.mjs 10.17 KB
14
- ESM ⚡️ Build success in 11ms
15
- DTS Build start
16
- DTS ⚡️ Build success in 912ms
17
- DTS dist/index.d.mts 13.00 B