Intent
A complaint I often hear about Warlocks is that, unless they choose Pact of the Blade/Hexblade, they are effectively pidgeon-holed into playing a caster that sits in the back, blasting foes from afar.
This homebrew cantrip attempts to remedy that by providing an alternative to Eldritch Blast that is nonetheless compatible with Eldritch Invocations, such that the fantasy of a magical melee warrior is attainable while being usable with a variety of Patrons and Pact Boons, all the while utilizing the full breadth of customization that Eldritch Invocations provide.
Variant: Eldritch Blade
Warlock 1st level feature.
Whenever you learn Eldritch Blast, you can choose to instead learn Eldritch Blade. This cantrip is considered the same cantrip as Eldritch Blast, with the modifications listed below.
Eldritch Blade
Evocation cantrip
Casting Time: 1 action
Range: 5 feet
Components: S, M (a hilt or hilt-like rod worth at least 1 GP)
Duration: 1 minuteYou create a blade of crackling magical energy in your hand that lasts
for the duration or until the spell is cast again. As part of casting
this spell, and as an action for the remaining duration, you can
strike at a creature or object within range. Perform a melee spell
attack against the target. On a hit, the target takes 1d10 force
damage, or 2d6 force damage if you hold the blade in both hands while
making the attack.The magical blade emanates from the hilt used to cast this spell, or
wraps around an existing blade if it is attached to the hilt.
Using an existing blade confers no additional benefits to the attacks
made with this spell. If you release the hilt, the spell ends.This spell magically amplifies the fervor of your attacks, such that you can
attack more than once with this spell when you reach higher levels:
two attacks at 5th level, three attacks at 11th level, and four
attacks at 17th level. You can direct the attack at the same target or
at different ones. Make a separate attack roll for each attack.
Eldritch Invocations
Any Eldritch Invocation with a prerequisite of Eldritch Blast affects Eldritch Blade as if it were the same cantrip. The following Eldritch Invocations have their effects replaced:
Eldritch Spear: when you cast Eldritch Blade, its range is 10 feet.
Grasp of Hadar: Once on each of your turns before attacking with Eldritch Blade, you can magically teleport to an unoccupied space within 5 feet of the target of your attack, provided you can see the creature, and the creature is within 15 feet of you.
Analysis
The characteristics and usage of Eldritch Blade closely follow those of Eldritch Blast, except that the spell can only be cast at melee range.
Components: the hilt component is given a gold cost so that the component cannot be replaced with a spellcasting focus. This is mainly to evoke imagery of a fantasy lightsaber blade that is emitted from the hilt. Additionally, the spell's wording allows the user to use an existing weapon as the spellcasting component, as if using magic to fuel their attacks. The magical blade cannot be given to an ally, so there's no room for cheesing the system by giving your allies magically creating blades.
Damage: in order to compensate for the significant reduction of power associated with Eldritch Blade's reduced range, I've given it the option to be wielded with two hands for moderately increased damage. This increase is deliberately similar to the increase in damage from a longsword to a greatsword.
Eldritch Invocations: Eldritch Spear normally provides an ~2x improvement to the range of Eldritch Blast, so I've followed the same logic. Grasp of Hadar is more tricky; within 5 feet, you cannot pull a target any closer to yourself, so instead I've changed the wording such that a user can move themselves closer to a distant target. The increased utility of teleportation for escaping grapples comes at the cost of reduced safety, as the ability can only be used to teleport next to the target.
How is this different from Pact of the Blade/Hexblade? For starters, this option allows Warlocks to choose a different Pact Boon. This cantrip uses the Warlock's spellcasting ability, meaning that it uses Charisma for attack rolls. This cantrip is still a spell, so it has none of the benefits of magic weapons (i.e. bonuses on attack and damage rolls, additional effects on hit, etc.), and none of the benefits of Pact of the Blade like its associated Eldritch Invocations.
Conclusion
Is this homebrew spell balanced? I've combed through the list of Eldritch Invocations and I'm confident that I've identified any potentially strange interactions. Thank you for reading.
Best Answer
I'd be wary. A character built around this is likely to be overly fragile.
First, is it overpowered? No. As a warlock, giving up Eldritch Blast is a big deal, and the numbers you're pulling out of the result aren't all that terrible.
Damage compared to a standard (non-hexblade, non-Blade Pact) Warlock:
Damage compared to a melee class
The real issue, though, comes in the form of survivability. Specifically, the character becomes melee-primary but doesn't have anything in particular to help them survive in melee. A standard warlock is going to be a lot more fragile than any class that's intended to work in melee, and you're already turning down the Hexblade (the easiest way for the warlock to grab a defense upgrade). You could take Medium Armor proficiency, but if you're willing to throw around feats like that you could also just take Crossbow Expert and not have to lose out on your (class feature) ranged option. I'm not saying that this is insoluble, but it's the sort of thing that will take real work.
...and it's with that context that I look at your modifications to Grasp of Hadar. From some ways of looking at things it's strong. Being able to move around while ignoring opportunity attacks is indeed powerful, especially when that movement is free as part of an attack. In this case, though... its ability to get you away from melee is limited, because it's fundamentally pulling you into melee. It might be cool for getting you on top of a caster for lockdown purposes, but the limited range hurts you there (if you're not pretty close to the caster in the first place, then you'll still have to take an opportunity attack disengaging from someone) and you'll need to actually have an opportunity attack available before "lockdown" starts meaning anything. Sure, it's potentially quite useful... but it's not the game-breaker that it might look at first. Further, quite a lot of its functionality (teleport to a location adjacent to a foe, and still have your action and move left) is duplicated by the Relentless Hex invocation, which also allows a great deal more in the way of shenanigans (especially if you happen to have a flying familiar). On the other hand, Relentless Hex requires level 7. So... maybe put a level requirement on this version? It's not like they won't have other things to spend their invocations on in the meantime.
In the end, I think this is overall weaker than standard EB, though not so weak that it's unplayable. I'd be concerned that the character may have more difficulty surviving in melee than standard melee builds. I might suggest putting a level minimum on Grasp of Hadar. It's certainly not overly strong overall.