Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/publish-smartem-workspace.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish smartem-workspace to PyPI
name: smartem-workspace CLI tool PyPI package

on:
push:
Expand Down
46 changes: 46 additions & 0 deletions core/claude-code-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"version": "1.0.0",
"description": "Claude Code integration configuration for SmartEM workspace",
"claudeConfig": {
"skills": [
{ "name": "database-admin", "path": "claude-code/shared/skills/database-admin" },
{ "name": "devops", "path": "claude-code/shared/skills/devops" },
{ "name": "technical-writer", "path": "claude-code/shared/skills/technical-writer" },
{ "name": "git", "path": "claude-code/shared/skills/git" },
{ "name": "github", "path": "claude-code/shared/skills/github" },
{ "name": "ascii-art", "path": "claude-code/shared/skills/ascii-art" },
{ "name": "playwright-skill", "path": "claude-code/smartem-frontend/skills/playwright-skill" }
],
"defaultPermissions": {
"allow": [
"Bash(git:*)",
"Bash(ls:*)",
"Bash(cat:*)",
"WebSearch",
"mcp__serena__*"
]
}
},
"serenaConfig": {
"languages": ["typescript", "python"],
"encoding": "utf-8",
"ignoreAllFilesInGitignore": true,
"projectName": "smartem-workspace"
},
"mcpConfig": {
"serena": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server",
"--context",
"ide-assistant",
"--project",
"${PWD}"
]
}
}
}
50 changes: 50 additions & 0 deletions core/claude-code-config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* Claude Code integration configuration for SmartEM workspace.
*
* Source of truth: claude-code-config.json
* This file re-exports the JSON data with TypeScript types for type safety.
*/

import claudeCodeConfig from './claude-code-config.json'

export interface SkillDefinition {
name: string
path: string
}

export interface DefaultPermissions {
allow: string[]
}

export interface ClaudeConfig {
skills: SkillDefinition[]
defaultPermissions: DefaultPermissions
}

export interface SerenaConfig {
languages: string[]
encoding: string
ignoreAllFilesInGitignore: boolean
projectName: string
}

export interface McpServerConfig {
command: string
args: string[]
}

export interface McpConfig {
serena: McpServerConfig
}

export interface ClaudeCodeConfigFile {
version: string
description: string
claudeConfig: ClaudeConfig
serenaConfig: SerenaConfig
mcpConfig: McpConfig
}

export const claudeCodeConfigData: ClaudeCodeConfigFile = claudeCodeConfig

export default claudeCodeConfigData
79 changes: 79 additions & 0 deletions core/dev-requirements.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"version": "1.0.0",
"description": "Developer requirements for SmartEM workspace local environment setup",
"tools": [
{
"name": "git",
"command": "git",
"versionArgs": ["--version"],
"required": true,
"description": "Version control system"
},
{
"name": "Python",
"command": "python3",
"versionArgs": ["--version"],
"required": true,
"minVersion": "3.11",
"description": "Python interpreter (3.11+ required)"
},
{
"name": "uv",
"command": "uv",
"versionArgs": ["--version"],
"required": false,
"description": "Fast Python package installer (recommended)"
},
{
"name": "Node.js",
"command": "node",
"versionArgs": ["--version"],
"required": false,
"minVersion": "22",
"description": "JavaScript runtime for frontend development"
},
{
"name": "npm",
"command": "npm",
"versionArgs": ["--version"],
"required": false,
"description": "Node package manager"
},
{
"name": "Container runtime",
"command": "docker",
"versionArgs": ["--version"],
"required": false,
"alternatives": ["podman"],
"description": "Container runtime (docker or podman)"
},
{
"name": "kubectl",
"command": "kubectl",
"versionArgs": ["version", "--client", "--output=yaml"],
"required": false,
"description": "Kubernetes CLI"
},
{
"name": "k3s",
"command": "k3s",
"versionArgs": ["--version"],
"required": false,
"description": "Lightweight Kubernetes distribution"
},
{
"name": "gh",
"command": "gh",
"versionArgs": ["--version"],
"required": false,
"description": "GitHub CLI"
}
],
"network": {
"checkUrl": "https://github.com",
"timeout": 5,
"required": false,
"description": "Network connectivity to GitHub"
}
}
36 changes: 36 additions & 0 deletions core/dev-requirements.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/**
* Developer requirements for SmartEM workspace local environment setup.
*
* Source of truth: dev-requirements.json
* This file re-exports the JSON data with TypeScript types for type safety.
*/

import devRequirementsConfig from './dev-requirements.json'

export interface ToolRequirement {
name: string
command: string
versionArgs: string[]
required: boolean
minVersion?: string
alternatives?: string[]
description: string
}

export interface NetworkCheck {
checkUrl: string
timeout: number
required: boolean
description: string
}

export interface DevRequirementsConfig {
version: string
description: string
tools: ToolRequirement[]
network: NetworkCheck
}

export const devRequirements: DevRequirementsConfig = devRequirementsConfig

export default devRequirements
43 changes: 1 addition & 42 deletions core/repos.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,46 +358,5 @@
}
]
}
],
"claudeConfig": {
"skills": [
{ "name": "database-admin", "path": "claude-code/shared/skills/database-admin" },
{ "name": "devops", "path": "claude-code/shared/skills/devops" },
{ "name": "technical-writer", "path": "claude-code/shared/skills/technical-writer" },
{ "name": "git", "path": "claude-code/shared/skills/git" },
{ "name": "github", "path": "claude-code/shared/skills/github" },
{ "name": "ascii-art", "path": "claude-code/shared/skills/ascii-art" },
{ "name": "playwright-skill", "path": "claude-code/smartem-frontend/skills/playwright-skill" }
],
"defaultPermissions": {
"allow": [
"Bash(git:*)",
"Bash(ls:*)",
"Bash(cat:*)",
"WebSearch",
"mcp__serena__*"
]
}
},
"serenaConfig": {
"languages": ["typescript", "python"],
"encoding": "utf-8",
"ignoreAllFilesInGitignore": true,
"projectName": "smartem-workspace"
},
"mcpConfig": {
"serena": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/oraios/serena",
"serena",
"start-mcp-server",
"--context",
"ide-assistant",
"--project",
"${PWD}"
]
}
}
]
}
24 changes: 19 additions & 5 deletions packages/smartem-workspace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ uv tool install smartem-workspace

## Usage

### Global options

```
--no-color Disable colored output
--plain Plain mode: no color, no interactive prompts
```

### Initialize a new workspace

```bash
Expand Down Expand Up @@ -77,6 +84,9 @@ Sync skips repos with uncommitted changes or not on main/master branch.
# Show workspace status (alias for check)
smartem-workspace status

# Set up Claude Code integration (after init without --with-claude)
smartem-workspace claude setup

# Add a single repo (not yet implemented)
smartem-workspace add DiamondLightSource/smartem-frontend
```
Expand All @@ -87,15 +97,19 @@ smartem-workspace add DiamondLightSource/smartem-frontend
--path PATH Target directory (default: current directory)
--preset NAME Use preset: smartem-core, full, aria-reference, minimal
--no-interactive Skip prompts, use preset only
--ssh Use SSH URLs (default: HTTPS)
--skip-claude Skip Claude Code setup
--git-ssh Force SSH URLs for all repos
--git-https Force HTTPS URLs (skip auto-detection)
--with-claude Enable Claude Code integration setup
--skip-serena Skip Serena MCP setup
--skip-dev-requirements Skip developer requirements check
```

**Git URL auto-detection:** By default, the CLI automatically detects if you have SSH authentication configured for GitHub. If SSH works, repos are cloned via SSH (enabling push); otherwise HTTPS is used (read-only). Use `--git-ssh` or `--git-https` to override.

### Check options

```
--scope SCOPE Check scope: claude, repos, serena, or all (default: all)
--scope SCOPE Check scope: dev-requirements, claude, repos, serena, or all (default: all)
--fix Attempt to fix issues (recreate symlinks, dirs)
--offline Use bundled config instead of fetching from GitHub
```
Expand All @@ -109,9 +123,9 @@ smartem-workspace add DiamondLightSource/smartem-frontend
## What it sets up

1. **Repository clones** - Organized by organization (DiamondLightSource, FragmentScreen, GitlabAriaPHP)
2. **Claude Code configuration** - Skills, settings, permissions
2. **Claude Code configuration** (with `--with-claude`) - Skills, settings, permissions
3. **Serena MCP server** - Semantic code navigation
4. **Workspace structure** - CLAUDE.md, tmp/, testdata/ directories
4. **Workspace structure** - tmp/, testdata/ directories

## Documentation

Expand Down
Loading