Skip to content

Commit 9ee89b7

Browse files
committed
feat(bin): add clas and daily-note
clas runs Claude Code against Synthetic.dev's GLM-5.2; daily-note is a Raycast script that opens (and creates) today's daily note.
1 parent 2c2b2e5 commit 9ee89b7

2 files changed

Lines changed: 69 additions & 0 deletions

File tree

bin/clas

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
# Claude Code via Synthetic.dev (GLM-5.2)
5+
# https://dev.synthetic.new/docs/guides/claude-code
6+
7+
export ANTHROPIC_AUTH_TOKEN="${SYNTHETIC_NEW_API_KEY:?Set SYNTHETIC_NEW_API_KEY (fnox)}"
8+
export ANTHROPIC_BASE_URL=https://api.synthetic.new/anthropic
9+
export ANTHROPIC_DEFAULT_HAIKU_MODEL=hf:zai-org/GLM-4.7-Flash
10+
export ANTHROPIC_DEFAULT_OPUS_MODEL=hf:zai-org/GLM-5.2
11+
export ANTHROPIC_DEFAULT_SONNET_MODEL=hf:zai-org/GLM-5.2
12+
export ANTHROPIC_MODEL=hf:zai-org/GLM-5.2
13+
export ANTHROPIC_SMALL_FAST_MODEL=hf:zai-org/GLM-4.7-Flash
14+
export CLAUDE_AUTOCOMPACT_PCT_OVERRIDE=90
15+
export CLAUDE_CODE_ATTRIBUTION_HEADER=0
16+
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=168000
17+
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
18+
export CLAUDE_CODE_SUBAGENT_MODEL=hf:zai-org/GLM-5.2
19+
export DISABLE_NON_ESSENTIAL_MODEL_CALLS=1
20+
21+
exec claude \
22+
--mcp-config "$HOME/.claude/mcp-search.json" \
23+
--disallowed-tools WebSearch \
24+
--append-system-prompt "The built-in WebSearch tool is unavailable in this environment. For any web search, use the Tavily MCP tools instead." \
25+
"$@"

bin/daily-note

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
# Required parameters:
4+
# @raycast.schemaVersion 1
5+
# @raycast.title Open Daily Note
6+
# @raycast.mode silent
7+
8+
# Optional parameters:
9+
# @raycast.icon 📓
10+
# @raycast.packageName Wiki
11+
# @raycast.description Open today's daily note in Typora, creating it if needed.
12+
13+
# Documentation:
14+
# @raycast.author Eric Boehs
15+
# @raycast.authorURL boehs.com
16+
17+
set -euo pipefail
18+
19+
DAILY_DIR="$HOME/Documents/Wiki/daily"
20+
TODAY=$(date +%Y-%m-%d)
21+
NOTE="$DAILY_DIR/$TODAY.md"
22+
23+
if [ ! -f "$NOTE" ]; then
24+
mkdir -p "$DAILY_DIR"
25+
cat > "$NOTE" <<EOF
26+
# $TODAY ($(date +%A))
27+
28+
> Week: [[$(date +%G-W%V)]].
29+
30+
## TODO
31+
32+
### Work
33+
34+
### Personal / Tinkering
35+
36+
### Solar Shop
37+
38+
### Personal / Farm
39+
40+
## Notes
41+
EOF
42+
fi
43+
44+
open -a Typora "$NOTE"

0 commit comments

Comments
 (0)