Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

fix: build and create-pipe

Louis Beaumont7e0bf4b7683a
diff --git a/.github/workflows/release-app.yml b/.github/workflows/release-app.yml
index d36ecece1..b8b0122de 100644
--- a/.github/workflows/release-app.yml
+++ b/.github/workflows/release-app.yml
@@ -471,25 +471,22 @@ jobs:
shell: powershell
env:
CN_API_KEY: ${{ secrets.CN_API_KEY }}
+ USER_AGENT: "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
run: |
# Create temp directory for CLI
$cliDir = "cn-cli-temp"
New-Item -ItemType Directory -Force -Path $cliDir
- # Download CLI from GitHub
- $cliUrl = "https://github.com/crabnebula-dev/cloud-releases/releases/latest/download/cloud-cli-x86_64-pc-windows-msvc.zip"
- $cliZip = "$cliDir\cli.zip"
+ # Download CLI with correct URL
+ $cliUrl = "https://cdn.crabnebula.app/download/crabnebula/cn-cli/latest/platform/windows-binary-x86_64"
Write-Host "Downloading CrabNebula CLI..."
- Invoke-WebRequest -Uri $cliUrl -OutFile $cliZip
-
- # Extract CLI
- Expand-Archive -Path $cliZip -DestinationPath $cliDir -Force
+ Invoke-WebRequest -Uri $cliUrl -UserAgent $env:USER_AGENT -OutFile "$cliDir\cn.exe"
# Run upload command
Write-Host "Uploading assets..."
$env:PATH = "$PWD\$cliDir;$env:PATH"
- ./cn-cli release upload ${{ secrets.CN_APP_SLUG }} --framework tauri --path ./screenpipe-app-tauri/src-tauri --api-key ${{ secrets.CN_API_KEY }}
+ ./cn-cli-temp/cn.exe release upload ${{ secrets.CN_APP_SLUG }} --framework tauri --path ./screenpipe-app-tauri/src-tauri --api-key ${{ secrets.CN_API_KEY }}
- name: Upload Assets to CrabNebula Cloud (Non-Windows)
if: matrix.tauri-args != '--target x86_64-pc-windows-msvc'
diff --git a/screenpipe-js/create-pipe/index.ts b/screenpipe-js/create-pipe/index.ts
index 631fa056a..7ab77f1ba 100644
--- a/screenpipe-js/create-pipe/index.ts
+++ b/screenpipe-js/create-pipe/index.ts
@@ -16,17 +16,6 @@ const PIPE_ADDITIONS = {
},
};
-const PIPE_TYPE_OPTIONS = [
- {
- name: "ui - create a pipe with a user interface",
- value: "ui",
- },
- {
- name: "headless - create a pipe without ui",
- value: "headless",
- },
-];
-
async function downloadAndExtractRepo(
owner: string,
repo: string,
@@ -129,90 +118,40 @@ async function main() {
default: pipeName,
});
- // get pipe type
- const pipeType = await select({
- message: "would you like to add a user interface to your pipe?",
- choices: PIPE_TYPE_OPTIONS,
- });
-
- // ai customization confirmation
- // const useAI = await confirm({
- // message: "would you like to use ai to customize your pipe? (experimental)",
- // default: false,
- // });
-
const spinner = ora("creating your pipe...").start();
try {
// Download and extract the appropriate template
- if (pipeType === "ui") {
- await downloadAndExtractRepo(
- "mediar-ai",
- "screenpipe",
- "main",
- "pipes/obsidian",
- directory
- );
-
- // Update package.json with the pipe name
- const pkgPath = path.join(process.cwd(), directory, "package.json");
- const pkg = await fs.readJson(pkgPath);
-
- pkg.name = pipeName;
- pkg.dependencies = {
- ...pkg.dependencies,
- ...PIPE_ADDITIONS.dependencies,
- };
- pkg.devDependencies = {
- ...pkg.devDependencies,
- ...PIPE_ADDITIONS.devDependencies,
- };
-
- await fs.writeJson(pkgPath, pkg, { spaces: 2 });
- } else {
- await downloadAndExtractRepo(
- "mediar-ai",
- "screenpipe",
- "main",
- "pipes/pipe-obsidian-time-logs",
- directory
- );
-
- // Update pipe.ts only for headless pipes
- const pipePath = path.join(process.cwd(), directory, "pipe.ts");
- let pipeContent = await fs.readFile(pipePath, "utf8");
- pipeContent = pipeContent.replace(
- /name: ["'].*["']/,
- `name: "${pipeName}"`
- );
- await fs.writeFile(pipePath, pipeContent);
- }
-
- // if (useAI) {
- // spinner.text = "customizing with ai...";
- // // TODO: implement AI customization
- // await new Promise((resolve) => setTimeout(resolve, 1000)); // placeholder
- // }
+ await downloadAndExtractRepo(
+ "mediar-ai",
+ "screenpipe",
+ "main",
+ "pipes/obsidian",
+ directory
+ );
+
+ // Update package.json with the pipe name
+ const pkgPath = path.join(process.cwd(), directory, "package.json");
+ const pkg = await fs.readJson(pkgPath);
+
+ pkg.name = pipeName;
+ pkg.dependencies = {
+ ...pkg.dependencies,
+ ...PIPE_ADDITIONS.dependencies,
+ };
+ pkg.devDependencies = {
+ ...pkg.devDependencies,
+ ...PIPE_ADDITIONS.devDependencies,
+ };
+
+ await fs.writeJson(pkgPath, pkg, { spaces: 2 });
spinner.succeed(chalk.green("pipe created successfully! 🎉"));
console.log("\nto get started:");
console.log(chalk.cyan(`cd ${directory}`));
console.log(chalk.cyan("bun install # or use: npm install, pnpm install, yarn"));
-
- if (pipeType === "ui") {
- console.log(chalk.cyan("bun dev # or use: npm run dev, pnpm dev, yarn dev"));
- } else {
- console.log(
- chalk.cyan(`export SCREENPIPE_DIR="$HOME/.screenpipe"
-export PIPE_ID="${pipeName}"
-export PIPE_FILE="pipe.ts"
-export PIPE_DIR="$SCREENPIPE_DIR/pipes/${pipeName}"
-
-bun run pipe.ts # or use: npm run pipe.ts, pnpm pipe.ts, yarn pipe.ts
- `)
- );
- }
+ console.log(chalk.cyan("bun dev # or use: npm run dev, pnpm dev, yarn dev"));
console.log(
"\nwhen you're ready, you can ship your pipe to the app by adding it to the pipe store using the UI and then send a PR to the main repo.\n"
diff --git a/screenpipe-js/create-pipe/package.json b/screenpipe-js/create-pipe/package.json
index 5676fd6bb..e493ea693 100644
--- a/screenpipe-js/create-pipe/package.json
+++ b/screenpipe-js/create-pipe/package.json
@@ -1,6 +1,6 @@
{
"name": "@screenpipe/create-pipe",
- "version": "0.0.9",
+ "version": "0.0.10",
"description": "create a new screenpipe pipe with nextjs",
"type": "module",
"bin": {
diff --git a/screenpipe-js/package.json b/screenpipe-js/package.json
index f1ea25db0..37aff44a8 100644
--- a/screenpipe-js/package.json
+++ b/screenpipe-js/package.json
@@ -1,6 +1,6 @@
{
"name": "@screenpipe/js",
- "version": "0.1.10-beta.24",
+ "version": "0.1.11",
"type": "module",
"main": "./dist/main.cjs",
"module": "./dist/main.js",