shareful-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Shareful Init

Shareful初始化

Set up a shareful.ai shares repository so you can start capturing and sharing coding solutions.
搭建shareful.ai共享仓库,让你能够开始记录并分享编码解决方案。

When to Use This Skill

何时使用该技能

Use this skill when the user:
  • Wants to set up a shares repository for the first time
  • Asks "how do I start sharing solutions" or "set up shareful"
  • Wants to contribute fixes back to the community
  • Needs a repo to store SHARE.md files
当用户有以下需求时,可使用本技能:
  • 首次搭建共享仓库
  • 询问“如何开始分享解决方案”或“搭建shareful”
  • 想要向社区贡献修复方案
  • 需要一个仓库来存储SHARE.md文件

What Init Creates

初始化会创建的内容

npx shareful-ai init [name]
creates a ready-to-use shares repository:
my-shares/
  .gitignore
  README.md
  AGENTS.md
  shares/
    example-share/
      SHARE.md
  • shares/
    -- directory for all SHARE.md solution files
  • AGENTS.md
    -- documents the SHARE.md format for AI agents working in the repo
  • README.md
    -- repo overview with quick start instructions
  • example-share/SHARE.md
    -- template share to get started
The command also initializes a git repository with an initial commit and saves the repo path to
~/.shareful/config.json
.
npx shareful-ai init [name]
会创建一个可直接使用的共享仓库:
my-shares/
  .gitignore
  README.md
  AGENTS.md
  shares/
    example-share/
      SHARE.md
  • shares/
    —— 用于存放所有SHARE.md解决方案文件的目录
  • AGENTS.md
    —— 记录供仓库中AI Agent使用的SHARE.md格式规范
  • README.md
    —— 仓库概览及快速入门指南
  • example-share/SHARE.md
    —— 用于快速上手的模板共享文件
该命令还会初始化一个git仓库并完成初始提交,同时将仓库路径保存到
~/.shareful/config.json
中。

Setup Workflow

搭建流程

IMPORTANT: You MUST complete all 3 steps. After pushing to GitHub, you MUST run
npx shareful-ai register
-- without it the repo will never appear on shareful.ai.
重要提示:你必须完成全部3个步骤。推送到GitHub后,必须运行
npx shareful-ai register
——否则仓库将不会在shareful.ai上显示。

Step 1: Create the Repository

步骤1:创建仓库

bash
npx shareful-ai init my-shares
The name must be alphanumeric with dots, hyphens, or underscores (max 128 characters). Defaults to
shares
if not provided. The command creates an initial git commit automatically.
bash
npx shareful-ai init my-shares
仓库名称只能包含字母、数字、点号、连字符和下划线(最多128个字符)。如果未提供名称,默认使用
shares
。该命令会自动完成初始git提交。

Step 2: Push to GitHub

步骤2:推送到GitHub

bash
cd my-shares
gh repo create my-shares --source . --public --push
Or create the repository manually on GitHub and push:
bash
cd my-shares
git remote add origin git@github.com:username/my-shares.git
git push -u origin main
bash
cd my-shares
gh repo create my-shares --source . --public --push
或者手动在GitHub上创建仓库后推送:
bash
cd my-shares
git remote add origin git@github.com:username/my-shares.git
git push -u origin main

Step 3: Register for Indexing

步骤3:注册以实现索引

Immediately after pushing, register the repo. This is required -- the repo will not be indexed and shares will not be discoverable without it:
bash
npx shareful-ai register
Optionally, create your first share with
npx shareful-ai create
.
推送完成后立即注册仓库。这是必填步骤——未注册的仓库不会被索引,共享内容也无法被发现:
bash
npx shareful-ai register
你也可以选择使用
npx shareful-ai create
创建你的第一个共享内容。

Name Validation Rules

名称验证规则

  • Letters, numbers, dots, hyphens, and underscores only
  • Max 128 characters
  • Examples:
    my-shares
    ,
    company.solutions
    ,
    team_fixes
  • 仅允许使用字母、数字、点号、连字符和下划线
  • 最多128个字符
  • 示例:
    my-shares
    ,
    company.solutions
    ,
    team_fixes

Related Skills

相关技能

  • shareful-create
    for writing high-quality SHARE.md files
  • shareful-search
    for finding existing solutions on shareful.ai
  • shareful-create
    :用于编写高质量的SHARE.md文件
  • shareful-search
    :用于在shareful.ai上查找现有解决方案