**Interactive setup wizard for the Fractary Work Plugin**
Interactive setup wizard that configures the Fractary Work Plugin for GitHub, Jira, or Linear. Use this first to create your configuration file with validated credentials.
/plugin marketplace add fractary/claude-plugins/plugin install fractary-work@fractaryInteractive setup wizard for the Fractary Work Plugin
The /work:init command provides an interactive setup wizard that guides you through configuring the Fractary Work Plugin for your project. It detects your environment, validates credentials, and creates the appropriate configuration file.
# Run setup wizard (interactive)
/work:init
# Setup with specific platform
/work:init --platform github
# Non-interactive mode with defaults
/work:init --platform github --token $GITHUB_TOKEN --yes
# Force reconfigure
/work:init --force
--platform <name> - Specify platform: github, jira, or linear--token <value> - Provide GitHub/Jira/Linear token directly--yes or -y - Skip confirmations (use detected/provided values)--force - Overwrite existing configuration--help - Show this help message.fractary/plugins/work/ directory━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Fractary Work Plugin Setup Wizard
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Detecting environment...
✓ Git repository detected
✓ Remote: git@github.com:owner/repo.git
✓ Detected platform: GitHub (github.com)
If platform can't be detected:
Select work tracking platform:
1. GitHub Issues (github.com or Enterprise)
2. Jira Cloud (atlassian.net)
3. Linear (linear.app)
Choice [1-3]:
GitHub Configuration:
Repository owner: [auto-detected or prompt]
Repository name: [auto-detected or prompt]
GitHub API URL: https://api.github.com
Do you have a GITHUB_TOKEN environment variable set? (y/n):
Jira Configuration:
Jira URL (e.g., https://your-domain.atlassian.net):
Project key (e.g., PROJ):
Email address:
Do you have a JIRA_TOKEN environment variable set? (y/n):
Linear Configuration:
Workspace ID:
Team ID:
Team key (e.g., ENG):
Do you have a LINEAR_API_KEY environment variable set? (y/n):
Enter token (or press Enter to use environment variable):
[hidden input]
Validating token...
✓ Token is valid
✓ Access verified for: owner/repo
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Configuration Summary
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Platform: GitHub
Repository: owner/repo
Config: .fractary/plugins/work/config.json
✓ Configuration file created
✓ GitHub token validated
✓ Repository access verified
✓ gh CLI available
Setup complete! Try these commands:
/work:issue create "New feature" --type feature
/work:issue fetch 123
/work:issue comment 123 "Working on this"
/work:state close 123
Documentation: plugins/work/README.md
$ /work:init
# Wizard guides through all steps interactively
# Detects GitHub from remote URL if present
# Prompts for token
# Creates config at .fractary/plugins/work/config.json
$ export GITHUB_TOKEN="ghp_..."
$ /work:init --platform github --yes
# Uses existing token from environment
# Auto-detects owner/repo from git remote
# Creates config automatically
$ export JIRA_TOKEN="your_token"
$ export JIRA_EMAIL="your@email.com"
$ /work:init --platform jira
# Prompts for Jira URL and project key
# Uses tokens from environment
# Creates Jira-specific config
$ /work:init --force
# Overwrites existing configuration
# Useful for fixing broken config
# Runs full wizard again
// Pseudo-code for detection logic
remote_url = git remote get-url origin
if (remote_url.includes("github.com") || remote_url.includes("github")) {
platform = "github"
// Extract owner/repo from URL
} else {
// Prompt user to select platform
}
// Extract owner and repo from remote URL
// SSH: git@github.com:owner/repo.git
// HTTPS: https://github.com/owner/repo.git
if (ssh_format) {
parts = remote_url.split(":")[1].replace(".git", "").split("/")
} else {
parts = remote_url.split("github.com/")[1].replace(".git", "").split("/")
}
owner = parts[0]
repo = parts[1]
The wizard creates a configuration file with this structure:
{
"version": "2.0",
"project": {
"issue_system": "github",
"repository": "owner/repo"
},
"handlers": {
"work-tracker": {
"active": "github",
"github": {
"owner": "owner",
"repo": "repo",
"api_url": "https://api.github.com",
"classification": {
"type_labels": {
"feature": "type: feature",
"bug": "type: bug",
"chore": "type: chore"
}
},
"states": {
"open": "open",
"in_progress": "in_progress",
"closed": "closed"
},
"labels": {
"prefix": "type: "
}
}
}
},
"defaults": {
"auto_assign": true,
"template_issue_type": "feature"
}
}
{
"version": "2.0",
"handlers": {
"work-tracker": {
"active": "jira",
"jira": {
"url": "https://your-domain.atlassian.net",
"project_key": "PROJ",
"email": "your@email.com",
"custom_fields": {}
}
}
}
}
{
"version": "2.0",
"handlers": {
"work-tracker": {
"active": "linear",
"linear": {
"workspace_id": "workspace-id",
"team_id": "team-id",
"team_key": "ENG"
}
}
}
}
The wizard performs these validations:
git rev-parse --git-dir
# Warn if not in git repository (not required)
gh auth status
# Or direct API call:
curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
gh api repos/{owner}/{repo}
# Verify read access to repository
curl -u email:token https://your-domain.atlassian.net/rest/api/3/myself
# Verify authentication and get user info
curl -H "Authorization: LINEAR_API_KEY" https://api.linear.app/graphql \
-d '{"query": "{ viewer { id name } }"}'
# Verify API key and get user info
# Test that config-loader.sh can read the new config
./plugins/work/skills/work-common/scripts/config-loader.sh
✗ Error: GitHub token validation failed
Possible issues:
1. Token is invalid or expired
2. Token doesn't have required scopes (repo, read:org)
3. Network connectivity issues
Generate a new token:
https://github.com/settings/tokens
Required scopes: repo, read:org
✗ Error: Cannot access repository owner/repo
Possible issues:
1. Repository doesn't exist
2. Token doesn't have access to this repository
3. Owner or repo name is incorrect
Verify repository exists:
https://github.com/owner/repo
⚠ Configuration already exists at:
.fractary/plugins/work/config.json
Options:
1. Update existing config (merge changes)
2. Overwrite with new config
3. Cancel and keep existing
Choice [1-3]:
⚠ Warning: Not in a git repository
Cannot auto-detect repository. You'll need to manually enter:
- Repository owner
- Repository name
Or navigate to your git repository first:
cd /path/to/your/repo
<CRITICAL_RULES>
--force flag is used.fractary/plugins/work/config.json (no global scope)
</CRITICAL_RULES>Environment Variables:
$GITHUB_TOKEN - GitHub token$JIRA_TOKEN - Jira API token$JIRA_EMAIL - Jira email address$LINEAR_API_KEY - Linear API key
</INPUTS>
Detect environment
Check existing configuration
.fractary/plugins/work/config.jsonPlatform selection (if not detected/specified)
Gather platform-specific configuration
Authentication setup
Create configuration
.fractary/plugins/work/ directory if neededplugins/work/config/config.example.jsonValidate setup
Display summary
Failure:
Exit Codes:
bash plugins/work/skills/work-initializer/scripts/init.sh
The script will:
.fractary/plugins/work/config.json with appropriate defaultsWith options:
# Force overwrite existing config
bash plugins/work/skills/work-initializer/scripts/init.sh --force
# Specify platform explicitly
bash plugins/work/skills/work-initializer/scripts/init.sh --platform github
After running the script:
Success output should include:
✅ Fractary Work Plugin initialized!
Configuration: .fractary/plugins/work/config.json
Platform: GitHub
Repository: {owner}/{repo}
Next steps:
1. Ensure your token is set: export GITHUB_TOKEN="your_token"
2. Test with: /work:issue-fetch 1
</IMPLEMENTATION>
<AGENT_INVOCATION>
For full interactive wizard with token validation and Jira/Linear support, invoke the work-manager agent with operation initialize-configuration. The agent will use the work-initializer skill for the complete interactive experience.
</AGENT_INVOCATION>
<ERROR_HANDLING>
gh CLI for full functionalityrepo, read:orggh auth status or curl https://api.github.com/usergh api repos/{owner}/{repo}curl -u email:token https://domain.atlassian.net/rest/api/3/myselfcurl -H "Authorization: KEY" https://api.linear.app/graphqlIf the wizard fails, try manual configuration:
# Create config directory
mkdir -p .fractary/plugins/work
# Copy example config
cp plugins/work/config/config.example.json .fractary/plugins/work/config.json
# Edit manually
nano .fractary/plugins/work/config.json
Then set your token:
# For GitHub
export GITHUB_TOKEN="your_token_here"
# For Jira
export JIRA_TOKEN="your_api_token"
export JIRA_EMAIL="your@email.com"
# For Linear
export LINEAR_API_KEY="your_api_key"
And test:
/work:issue fetch --help