@mdless/cli 1.0.5 β 1.0.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 +29 -24
- package/package.json +1 -1
- package/src/index.ts +58 -5
package/README.md
CHANGED
|
@@ -6,25 +6,47 @@ You know that feeling when you craft the perfect Claude Code skill, and then you
|
|
|
6
6
|
|
|
7
7
|
Yeah, we're tired of that too.
|
|
8
8
|
|
|
9
|
-
##
|
|
9
|
+
## π€ Why "mdless"?
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Two reasons:
|
|
12
|
+
|
|
13
|
+
1. Write less markdown. Skills are maintained by the community, so you don't have to craft every SKILL.md from scratch.
|
|
14
|
+
|
|
15
|
+
2. Mind less - stop overthinking - and just ship that shit out.
|
|
16
|
+
|
|
17
|
+
Mdless lets you share your superpowers across projects and teams. Skills live in your repo, not on your machineβso your whole team gets to be a superhero.
|
|
12
18
|
|
|
13
19
|
No more "it works on my Claude." No more copy-pasting skills between repos. No more explaining to Eddy how to set up his `.claude` folder for the fifth time.
|
|
14
20
|
|
|
15
|
-
##
|
|
21
|
+
## π¦ Installation
|
|
22
|
+
|
|
23
|
+
#### Run instantly with npx
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx @mdless/cli
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### Install globally with npm
|
|
16
30
|
|
|
17
31
|
```bash
|
|
18
32
|
npm install -g @mdless/cli
|
|
19
|
-
mdless skills
|
|
20
33
|
```
|
|
21
34
|
|
|
22
|
-
|
|
35
|
+
## π Key Features
|
|
36
|
+
|
|
37
|
+
#### Share skills across projects
|
|
23
38
|
|
|
24
39
|
```bash
|
|
25
|
-
|
|
40
|
+
mdless skills
|
|
26
41
|
```
|
|
27
42
|
|
|
43
|
+
| Skill | What it does |
|
|
44
|
+
| ---------------------------------------------- | ------------------------------------------------- |
|
|
45
|
+
| [**commit**](skills/commit/SKILL.md) | Writes commit messages so you don't have to think |
|
|
46
|
+
| [**pr**](skills/pr/SKILL.md) | Creates PRs with actual descriptions |
|
|
47
|
+
| [**pr-comments**](skills/pr-comments/SKILL.md) | Responds to PR comments (politely) |
|
|
48
|
+
| [**ci-errors**](skills/ci-errors/SKILL.md) | Reads CI logs and fixes the errors |
|
|
49
|
+
|
|
28
50
|
That's it. Pick the skills you want, hit enter, go back to shipping.
|
|
29
51
|
|
|
30
52
|
The CLI will:
|
|
@@ -35,23 +57,6 @@ The CLI will:
|
|
|
35
57
|
|
|
36
58
|
Commit the skills to your repo. Now everyone on your team has them. Revolutionary, we know.
|
|
37
59
|
|
|
38
|
-
##
|
|
39
|
-
|
|
40
|
-
| Skill | What it does |
|
|
41
|
-
| --------------- | ------------------------------------------------- |
|
|
42
|
-
| **commit** | Writes commit messages so you don't have to think |
|
|
43
|
-
| **pr** | Creates PRs with actual descriptions |
|
|
44
|
-
| **pr-comments** | Responds to PR comments (politely) |
|
|
45
|
-
| **ci-errors** | Reads CI logs and fixes the errors |
|
|
46
|
-
|
|
47
|
-
## Why "mdless"?
|
|
48
|
-
|
|
49
|
-
Two reasons:
|
|
50
|
-
|
|
51
|
-
1. **md-less** β Write less markdown. Skills are maintained by the community, so you don't have to craft every SKILL.md from scratch.
|
|
52
|
-
|
|
53
|
-
2. **mindless** β Stop overthinking. Mind less and just ship that shit out.
|
|
54
|
-
|
|
55
|
-
## License
|
|
60
|
+
## π License
|
|
56
61
|
|
|
57
62
|
MIT β go wild.
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,16 +1,69 @@
|
|
|
1
1
|
#!/usr/bin/env tsx
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
+
import { select } from "@inquirer/prompts";
|
|
3
4
|
import packageJson from "../package.json" with { type: "json" };
|
|
4
5
|
import { skillsCommand } from "./commands/skills.js";
|
|
6
|
+
import { withExitHandler } from "./utils.js";
|
|
7
|
+
|
|
8
|
+
const banner = `
|
|
9
|
+
\x1b[38;5;135mβββ\x1b[0m \x1b[38;5;141mββββ ββββ\x1b[38;5;147mβββββββ \x1b[38;5;153mβββ \x1b[38;5;159mββββββββ\x1b[38;5;195mββββββββ\x1b[38;5;231mββββββββ
|
|
10
|
+
\x1b[38;5;135mββββ\x1b[0m \x1b[38;5;141mβββββ βββββ\x1b[38;5;147mββββββββ\x1b[38;5;153mβββ \x1b[38;5;159mββββββββ\x1b[38;5;195mββββββββ\x1b[38;5;231mββββββββ
|
|
11
|
+
\x1b[38;5;135m ββββ\x1b[0m \x1b[38;5;141mβββββββββββ\x1b[38;5;147mβββ βββ\x1b[38;5;153mβββ \x1b[38;5;159mββββββ \x1b[38;5;195mββββββββ\x1b[38;5;231mββββββββ
|
|
12
|
+
\x1b[38;5;135m ββββ\x1b[0m \x1b[38;5;141mβββββββββββ\x1b[38;5;147mβββ βββ\x1b[38;5;153mβββ \x1b[38;5;159mββββββ \x1b[38;5;195mββββββββ\x1b[38;5;231mββββββββ
|
|
13
|
+
\x1b[38;5;135mββββ\x1b[0m \x1b[38;5;141mβββ βββ βββ\x1b[38;5;147mββββββββ\x1b[38;5;153mββββββββ\x1b[38;5;159mββββββββ\x1b[38;5;195mββββββββ\x1b[38;5;231mββββββββ
|
|
14
|
+
\x1b[38;5;135mβββ\x1b[0m \x1b[38;5;141mβββ βββ\x1b[38;5;147mβββββββ \x1b[38;5;153mββββββββ\x1b[38;5;159mββββββββ\x1b[38;5;195mββββββββ\x1b[38;5;231mββββββββ\x1b[0m
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
const commands = [
|
|
18
|
+
{
|
|
19
|
+
name: "skills",
|
|
20
|
+
description: "Share Claude Code skills across projects and teams",
|
|
21
|
+
action: skillsCommand,
|
|
22
|
+
},
|
|
23
|
+
] as const;
|
|
24
|
+
|
|
25
|
+
async function interactiveMode(): Promise<void> {
|
|
26
|
+
console.log(banner);
|
|
27
|
+
console.log(
|
|
28
|
+
`\x1b[2m Mind less, ship more. v${packageJson.version}\x1b[0m\n`,
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const choice = await withExitHandler(
|
|
32
|
+
select({
|
|
33
|
+
message: "What would you like to do?",
|
|
34
|
+
choices: [
|
|
35
|
+
...commands.map((cmd) => ({
|
|
36
|
+
name: cmd.name,
|
|
37
|
+
value: cmd.name,
|
|
38
|
+
description: cmd.description,
|
|
39
|
+
})),
|
|
40
|
+
{ name: "exit", value: "exit", description: "Exit the CLI" },
|
|
41
|
+
],
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
if (choice === "exit") {
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const command = commands.find((cmd) => cmd.name === choice);
|
|
50
|
+
if (command) {
|
|
51
|
+
await command.action();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
5
54
|
|
|
6
55
|
const program = new Command()
|
|
7
56
|
.name("mdless")
|
|
8
57
|
.description("CLI tools for Claude Code hard-working devs")
|
|
9
58
|
.version(packageJson.version);
|
|
10
59
|
|
|
11
|
-
|
|
12
|
-
.command(
|
|
13
|
-
|
|
14
|
-
.action(skillsCommand);
|
|
60
|
+
for (const cmd of commands) {
|
|
61
|
+
program.command(cmd.name).description(cmd.description).action(cmd.action);
|
|
62
|
+
}
|
|
15
63
|
|
|
16
|
-
|
|
64
|
+
// If no arguments provided, show interactive mode
|
|
65
|
+
if (process.argv.length <= 2) {
|
|
66
|
+
interactiveMode();
|
|
67
|
+
} else {
|
|
68
|
+
program.parse();
|
|
69
|
+
}
|