Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

v0.3.4 — simplify GitHub onboarding: default co-author email, hide email field, 3-step setup

Salman Qureshi7e68c132863e
diff --git a/.env.example b/.env.example
index 419cd0da..5157a8bc 100644
--- a/.env.example
+++ b/.env.example
@@ -44,7 +44,7 @@ DAILY_TOKEN_BUDGET=50000
# Create at: https://github.com/settings/tokens?type=beta
GITHUB_TOKEN=
GITHUB_USERNAME=
-GITHUB_EMAIL=
# Default repo for GitHub tools (optional — you can also specify per-call)
GITHUB_DEFAULT_OWNER=
GITHUB_DEFAULT_REPO=
\ No newline at end of file
diff --git a/docs/docs.html b/docs/docs.html
index 27032320..1f02b64b 100644
--- a/docs/docs.html
+++ b/docs/docs.html
@@ -730,15 +730,13 @@
<code>Example: hotheadhacker</code>
</div>
- <h4>2. GitHub email (for co-author)</h4>
- <p>The email that appears in the <code>Co-authored-by</code> trailer on every Mercury-assisted commit. You can use
- your real email, a GitHub no-reply email (<code>[email protected]</code>), or
- <code>[email protected]</code> for Mercury's default.</p>
- <div class="terminal-inline">
- <code>Example: [email protected]</code>
- </div>
+ <h4>2. Co-authored-by (automatic)</h4>
+ <p>Every Mercury-assisted commit automatically includes a <code>Co-authored-by: Mercury &lt;[email protected]&gt;</code>
+ trailer. No configuration needed — this is the default. Mercury's avatar will appear alongside yours on GitHub.</p>
+ <p>You can customize the email in <code>~/.mercury/.env</code> by setting <code>GITHUB_EMAIL</code> if you prefer a
+ different co-author address.</p>
- <h4>3. GitHub PAT (Personal Access Token)</h4>
+ <h4>2. GitHub PAT (Personal Access Token)</h4>
<p>You need a token so Mercury can authenticate with the GitHub API. <strong>Never share this token.</strong> It's
stored locally in <code>~/.mercury/.env</code> and never sent anywhere except GitHub's API.</p>
@@ -770,7 +768,7 @@
</ol>
</div>
- <h4>4. Default repo</h4>
+ <h4>3. Default repo (optional)</h4>
<p>Set a default repository so you can say <code>"create an issue"</code> without specifying the repo every time.
You can enter it in any of these formats:</p>
<div class="terminal-inline">
diff --git a/package.json b/package.json
index f0ce2039..2fd14aa1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@cosmicstack/mercury-agent",
- "version": "0.3.3",
+ "version": "0.3.4",
"description": "Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI or Telegram.",
"type": "module",
"main": "dist/index.js",
diff --git a/src/index.ts b/src/index.ts
index d424b10e..fb4c3f88 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -223,10 +223,9 @@ async function configure(existingConfig?: MercuryConfig): Promise<void> {
const ghUsername = await ask(chalk.white(` 1. Your GitHub username${ghUserCurrent}: `));
if (ghUsername) config.github.username = ghUsername;
- const ghEmailCurrent = isReconfig && config.github.email ? ` [${config.github.email}]` : '';
- console.log(chalk.dim(' This appears in the Co-authored-by trailer on commits.'));
- const ghEmail = await ask(chalk.white(` 2. GitHub email (for co-author)${ghEmailCurrent}: `));
- if (ghEmail) config.github.email = ghEmail;
+ if (!config.github.email) {
+ config.github.email = '[email protected]';
+ }
console.log('');
console.log(chalk.dim(' You need a Personal Access Token (PAT) with repo access.'));
@@ -235,7 +234,7 @@ async function configure(existingConfig?: MercuryConfig): Promise<void> {
console.log(chalk.dim(' Classic: github.com/settings/tokens/new'));
console.log(chalk.dim(' → Scope: repo (full control)'));
const ghTokenCurrent = process.env.GITHUB_TOKEN ? ` [${maskKey(process.env.GITHUB_TOKEN)}]` : '';
- const ghToken = await ask(chalk.white(` 3. GitHub PAT${ghTokenCurrent}: `));
+ const ghToken = await ask(chalk.white(` 2. GitHub PAT${ghTokenCurrent}: `));
if (ghToken) {
appendToEnv('GITHUB_TOKEN', ghToken);
}
@@ -247,7 +246,7 @@ async function configure(existingConfig?: MercuryConfig): Promise<void> {
console.log(chalk.dim(' Example: hotheadhacker/mercury-agent'));
console.log(chalk.dim(' Example: https://github.com/hotheadhacker/mercury-agent'));
const ghOwnerCurrent = isReconfig && config.github.defaultOwner ? ` [${config.github.defaultOwner}/${config.github.defaultRepo}]` : '';
- const ghRepoInput = await ask(chalk.white(` 4. Default repo${ghOwnerCurrent}: `));
+ const ghRepoInput = await ask(chalk.white(` 3. Default repo${ghOwnerCurrent}: `));
if (ghRepoInput) {
const parsed = parseGithubRepo(ghRepoInput);
if (parsed) {
diff --git a/src/utils/config.ts b/src/utils/config.ts
index 5d58f9d3..e187fd42 100644
--- a/src/utils/config.ts
+++ b/src/utils/config.ts
@@ -125,7 +125,7 @@ export function getDefaultConfig(): MercuryConfig {
},
github: {
username: getEnv('GITHUB_USERNAME', ''),
- email: getEnv('GITHUB_EMAIL', ''),
+ email: getEnv('GITHUB_EMAIL', '[email protected]'),
defaultOwner: getEnv('GITHUB_DEFAULT_OWNER', ''),
defaultRepo: getEnv('GITHUB_DEFAULT_REPO', ''),
},