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
14 changes: 2 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
branches: [main]
permissions:
contents: read
packages: read
jobs:
ci:
runs-on: ubuntu-latest
Expand All @@ -13,15 +12,6 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com
scope: "@logfoxai"
cache: 'npm'
- name: Set up npm token
run: |
npm config set //npm.pkg.github.com/:_authToken "$NPM_TOKEN"
env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install deps
run: npm ci
- name: Build
run: npm run build
- run: npm ci
- run: npm run build
8 changes: 3 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -17,11 +17,9 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://npm.pkg.github.com
scope: "@logfoxai"
registry-url: https://registry.npmjs.org
- run: npm ci
- run: npm run build
- run: npx autorel@^2
- run: npx autorel@^2 --publish-args="--provenance"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# @logfoxai/cli
# @logfox/cli

[![build status](https://github.com/logfoxai/cli/actions/workflows/release.yml/badge.svg)](https://github.com/logfoxai/cli/actions)
[![SemVer](https://img.shields.io/badge/SemVer-2.0.0-blue)]()
Expand All @@ -10,28 +10,28 @@ CLI tool for sending local development logs to Logfox.
## Installation

```bash
npm install -g @logfoxai/cli
npm install -g @logfox/cli
```

## Quick Start

```bash
# Authenticate
logspace login
logfox login

# Run your app with logging
logspace run --name my-app -- npm start
logfox run --name my-app -- npm start
```

Logs appear in Logfox under environment "local".

## Commands

Run `logspace --help` to see all available commands.
Run `logfox --help` to see all available commands.

## How it Works

1. `logspace run` wraps your command and captures stdout/stderr
1. `logfox run` wraps your command and captures stdout/stderr
2. Logs are parsed (JSON or plain text) and batched
3. Sent to Logfox under environment "local" with app name `local-{hash}-{name}`
4. Issues are detected and grouped just like production logs
Expand All @@ -43,7 +43,7 @@ Run `logspace --help` to see all available commands.

## Configuration

Config is stored in `~/.logfox/config.json`. Use `logspace config` to view current settings.
Config is stored in `~/.logfox/config.json`. Use `logfox config` to view current settings.

| Key | Default | Description |
|-----|---------|-------------|
Expand All @@ -56,7 +56,7 @@ Config is stored in `~/.logfox/config.json`. Use `logspace config` to view curre
To point the CLI at local services:

```bash
logspace config:set apiUrl http://localhost:3000
logspace config:set appUrl http://localhost:4000
logspace login
logfox config:set apiUrl http://localhost:3000
logfox config:set appUrl http://localhost:4000
logfox login
```
24 changes: 12 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@logfoxai/cli",
"name": "@logfox/cli",
"version": "0.0.1",
"description": "Logfox CLI for local development logging",
"main": "dist/index.js",
"main": "./dist/index.js",
"bin": {
"logspace": "./dist/index.js"
"logfox": "dist/index.js"
},
"files": [
"dist"
Expand All @@ -14,7 +14,8 @@
"url": "git+https://github.com/logfoxai/cli.git"
},
"publishConfig": {
"registry": "https://npm.pkg.github.com"
"registry": "https://registry.npmjs.org",
"access": "public"
},
"scripts": {
"build": "tsc",
Expand Down